DSACryptoServiceProvider.SignData Method

Definition

Computes the hash value of the specified data and signs it.

Overloads

SignData(Byte[])

Computes the hash value of the specified byte array and signs the resulting hash value.

SignData(Stream)

Computes the hash value of the specified input stream and signs the resulting hash value.

SignData(Byte[], Int32, Int32)

Signs a byte array from the specified start point to the specified end point.

SignData(Byte[])

Source:
DSACryptoServiceProvider.Unix.cs
Source:
DSACryptoServiceProvider.Unix.cs
Source:
DSACryptoServiceProvider.Unix.cs

Computes the hash value of the specified byte array and signs the resulting hash value.

C#
public byte[] SignData(byte[] buffer);

Parameters

buffer
Byte[]

The input data for which to compute the hash.

Returns

Byte[]

The DSA signature for the specified data.

Remarks

This method creates a digital signature that is verified using the VerifyData method.

DSA uses the SHA1 hash algorithm.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

SignData(Stream)

Source:
DSACryptoServiceProvider.Unix.cs
Source:
DSACryptoServiceProvider.Unix.cs
Source:
DSACryptoServiceProvider.Unix.cs

Computes the hash value of the specified input stream and signs the resulting hash value.

C#
public byte[] SignData(System.IO.Stream inputStream);

Parameters

inputStream
Stream

The input data for which to compute the hash.

Returns

Byte[]

The DSA signature for the specified data.

Remarks

DSA uses the SHA1 hash algorithm.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

SignData(Byte[], Int32, Int32)

Source:
DSACryptoServiceProvider.Unix.cs
Source:
DSACryptoServiceProvider.Unix.cs
Source:
DSACryptoServiceProvider.Unix.cs

Signs a byte array from the specified start point to the specified end point.

C#
public byte[] SignData(byte[] buffer, int offset, int count);

Parameters

buffer
Byte[]

The input data to sign.

offset
Int32

The offset into the array from which to begin using data.

count
Int32

The number of bytes in the array to use as data.

Returns

Byte[]

The DSA signature for the specified data.

Remarks

This method creates a digital signature that is verified using the VerifyData method.

DSA uses the SHA1 hash algorithm.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1