AsymmetricSignatureDeformatter.VerifySignature 方法
定义
验证签名。Verifies the signature.
重载
| VerifySignature(Byte[], Byte[]) |
在派生类中重写时,验证指定数据的签名。When overridden in a derived class, verifies the signature for the specified data. |
| VerifySignature(HashAlgorithm, Byte[]) |
通过指定的哈希值验证签名。Verifies the signature from the specified hash value. |
VerifySignature(Byte[], Byte[])
在派生类中重写时,验证指定数据的签名。When overridden in a derived class, verifies the signature for the specified data.
public:
abstract bool VerifySignature(cli::array <System::Byte> ^ rgbHash, cli::array <System::Byte> ^ rgbSignature);
public abstract bool VerifySignature (byte[] rgbHash, byte[] rgbSignature);
abstract member VerifySignature : byte[] * byte[] -> bool
Public MustOverride Function VerifySignature (rgbHash As Byte(), rgbSignature As Byte()) As Boolean
参数
- rgbHash
- Byte[]
用 rgbSignature 签名的数据。The data signed with rgbSignature.
- rgbSignature
- Byte[]
要为 rgbHash 验证的签名。The signature to be verified for rgbHash.
返回
如果 rgbSignature 与使用指定的哈希算法和密钥在 rgbHash 上计算出的签名匹配,则为 true;否则为 false。true if rgbSignature matches the signature computed using the specified hash algorithm and key on rgbHash; otherwise, false.
注解
在调用此方法之前,必须指定公钥和哈希算法。You must specify a public key and a hash algorithm before calling this method.
适用于
VerifySignature(HashAlgorithm, Byte[])
通过指定的哈希值验证签名。Verifies the signature from the specified hash value.
public:
virtual bool VerifySignature(System::Security::Cryptography::HashAlgorithm ^ hash, cli::array <System::Byte> ^ rgbSignature);
public virtual bool VerifySignature (System.Security.Cryptography.HashAlgorithm hash, byte[] rgbSignature);
abstract member VerifySignature : System.Security.Cryptography.HashAlgorithm * byte[] -> bool
override this.VerifySignature : System.Security.Cryptography.HashAlgorithm * byte[] -> bool
Public Overridable Function VerifySignature (hash As HashAlgorithm, rgbSignature As Byte()) As Boolean
参数
- hash
- HashAlgorithm
用于验证签名的哈希算法。The hash algorithm to use to verify the signature.
- rgbSignature
- Byte[]
要验证的签名。The signature to be verified.
返回
如果签名对哈希有效,则为 true;否则为 false。true if the signature is valid for the hash; otherwise, false.
例外
hash 参数为 null。The hash parameter is null.
注解
此方法设置在验证输入哈希算法值的签名之前要使用的哈希算法。This method sets the hash algorithm to be used before verifying the signature of the input hash algorithm value.