DSACryptoServiceProvider.SignData 方法

定义

计算指定数据的哈希值,并对其进行签名。Computes the hash value of the specified data and signs it.

重载

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[])

计算指定字节数组的哈希值并对结果哈希值签名。Computes the hash value of the specified byte array and signs the resulting hash value.

public:
 cli::array <System::Byte> ^ SignData(cli::array <System::Byte> ^ buffer);
public byte[] SignData (byte[] buffer);
member this.SignData : byte[] -> byte[]
Public Function SignData (buffer As Byte()) As Byte()

参数

buffer
Byte[]

要为其计算哈希的输入数据。The input data for which to compute the hash.

返回

Byte[]

指定数据的 DSA 签名。The DSA signature for the specified data.

注解

此方法创建使用VerifyData方法进行验证的数字签名。This method creates a digital signature that is verified using the VerifyData method.

DSASHA1使用哈希算法。DSA uses the SHA1 hash algorithm.

另请参阅

SignData(Stream)

计算指定输入流的哈希值并对结果哈希值签名。Computes the hash value of the specified input stream and signs the resulting hash value.

public:
 cli::array <System::Byte> ^ SignData(System::IO::Stream ^ inputStream);
public byte[] SignData (System.IO.Stream inputStream);
member this.SignData : System.IO.Stream -> byte[]
Public Function SignData (inputStream As Stream) As Byte()

参数

inputStream
Stream

要为其计算哈希的输入数据。The input data for which to compute the hash.

返回

Byte[]

指定数据的 DSA 签名。The DSA signature for the specified data.

注解

DSASHA1使用哈希算法。DSA uses the SHA1 hash algorithm.

另请参阅

SignData(Byte[], Int32, Int32)

对字节数组从指定起始点到指定结束点进行签名。Signs a byte array from the specified start point to the specified end point.

public:
 cli::array <System::Byte> ^ SignData(cli::array <System::Byte> ^ buffer, int offset, int count);
public byte[] SignData (byte[] buffer, int offset, int count);
member this.SignData : byte[] * int * int -> byte[]
Public Function SignData (buffer As Byte(), offset As Integer, count As Integer) As Byte()

参数

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.

返回

Byte[]

指定数据的 DSA 签名。The DSA signature for the specified data.

注解

此方法创建使用VerifyData方法进行验证的数字签名。This method creates a digital signature that is verified using the VerifyData method.

DSASHA1使用哈希算法。DSA uses the SHA1 hash algorithm.

另请参阅

适用于