DSA.VerifyDataCore 方法

定义

重载

VerifyDataCore(Stream, ReadOnlySpan<Byte>, HashAlgorithmName, DSASignatureFormat)

验证数字签名对于所提供的数据是否有效。

VerifyDataCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, DSASignatureFormat)

验证数字签名对于所提供的数据是否有效。

VerifyDataCore(Stream, ReadOnlySpan<Byte>, HashAlgorithmName, DSASignatureFormat)

Source:
DSA.cs
Source:
DSA.cs
Source:
DSA.cs

验证数字签名对于所提供的数据是否有效。

protected virtual bool VerifyDataCore(System.IO.Stream data, ReadOnlySpan<byte> signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat);

参数

data
Stream

已签名的数据。

signature
ReadOnlySpan<Byte>

要验证的签名。

hashAlgorithm
HashAlgorithmName

用于对验证过程的数据进行哈希处理的哈希算法。

signatureFormat
DSASignatureFormat

signature 的编码格式。

返回

如果数字签名对所提供的数据有效,则为 true;否则为 false

例外

哈希处理或验证时出错。

适用于

.NET 10 和其他版本
产品 版本
.NET 5, 6, 7, 8, 9, 10

VerifyDataCore(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, DSASignatureFormat)

Source:
DSA.cs
Source:
DSA.cs
Source:
DSA.cs

验证数字签名对于所提供的数据是否有效。

protected virtual bool VerifyDataCore(ReadOnlySpan<byte> data, ReadOnlySpan<byte> signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat);

参数

data
ReadOnlySpan<Byte>

已签名的数据。

signature
ReadOnlySpan<Byte>

要验证的签名。

hashAlgorithm
HashAlgorithmName

用于对验证过程的数据进行哈希处理的哈希算法。

signatureFormat
DSASignatureFormat

signature 的编码格式。

返回

如果数字签名对所提供的数据有效,则为 true;否则为 false

例外

哈希处理或验证时出错。

适用于

.NET 10 和其他版本
产品 版本
.NET 5, 6, 7, 8, 9, 10