RSACng.SignHash(Byte[], HashAlgorithmName, RSASignaturePadding) 方法

定义

对使用指定哈希算法和填充模式进行了哈希处理的数据进行签名。Signs data that was hashed by using the specified hashing algorithm and padding mode.

public:
 override cli::array <System::Byte> ^ SignHash(cli::array <System::Byte> ^ hash, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::RSASignaturePadding ^ padding);
public override byte[] SignHash (byte[] hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding);
override this.SignHash : byte[] * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> byte[]
Public Overrides Function SignHash (hash As Byte(), hashAlgorithm As HashAlgorithmName, padding As RSASignaturePadding) As Byte()

参数

hash
Byte[]

要签名的哈希值。The hash to sign.

hashAlgorithm
HashAlgorithmName

哈希算法名称。The hash algorithm name.

padding
RSASignaturePadding

填充模式。The padding mode.

返回

Byte[]

已签名的数据。The signed data.

例外

hashnullhash is null.

- 或 --or- paddingnullpadding is null.

hashAlgorithmName 属性的值为 nullEmptyThe value of the Name property of hashAlgorithm is null or Empty.

padding 不等于 Pkcs1Psspadding does not equal Pkcs1 or Pss.

适用于