ECDsa.SignHash 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
SignHash(Byte[]) |
为指定的哈希值生成数字签名。 |
SignHash(Byte[], DSASignatureFormat) |
采用指定格式为指定的哈希值计算 ECDSA 签名。 |
SignHash(Byte[])
为指定的哈希值生成数字签名。
public:
abstract cli::array <System::Byte> ^ SignHash(cli::array <System::Byte> ^ hash);
public abstract byte[] SignHash (byte[] hash);
abstract member SignHash : byte[] -> byte[]
Public MustOverride Function SignHash (hash As Byte()) As Byte()
参数
- hash
- Byte[]
待签名数据的哈希值。
返回
- Byte[]
指定哈希值的数字签名。
例外
hash
参数为 null
。
适用于
SignHash(Byte[], DSASignatureFormat)
采用指定格式为指定的哈希值计算 ECDSA 签名。
public:
cli::array <System::Byte> ^ SignHash(cli::array <System::Byte> ^ hash, System::Security::Cryptography::DSASignatureFormat signatureFormat);
public byte[] SignHash (byte[] hash, System.Security.Cryptography.DSASignatureFormat signatureFormat);
member this.SignHash : byte[] * System.Security.Cryptography.DSASignatureFormat -> byte[]
Public Function SignHash (hash As Byte(), signatureFormat As DSASignatureFormat) As Byte()
参数
- hash
- Byte[]
要签名的哈希值。
- signatureFormat
- DSASignatureFormat
用于签名的编码格式。
返回
- Byte[]
指定数据的 ECDSA 签名。
例外
hash
为 null
。
signatureFormat
不是已知格式。
签名时出错。