DSA.VerifyData 方法  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
验证数字签名有效。
重载
| VerifyData(Byte[], Int32, Int32, Byte[], HashAlgorithmName, DSASignatureFormat) | 
						 验证数字签名对于所提供的数据是否有效。  | 
        	
| VerifyData(Byte[], Int32, Int32, Byte[], HashAlgorithmName) | 
						 通过使用指定的哈希算法计算字节数组一个部分中数据的哈希值,并将其与提供的签名进行比较,验证数字签名是否有效。  | 
        	
| VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, DSASignatureFormat) | 
						 验证数字签名对于所提供的数据是否有效。  | 
        	
| VerifyData(Stream, Byte[], HashAlgorithmName, DSASignatureFormat) | 
						 验证数字签名对于所提供的数据是否有效。  | 
        	
| VerifyData(Stream, Byte[], HashAlgorithmName) | 
						 通过使用指定的哈希算法计算指定流的哈希值,并将其与提供的签名进行比较,验证数字签名是否有效。  | 
        	
| VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName) | 
						 通过使用指定的哈希算法计算某字节范围内数据的哈希值,并将其与提供的签名进行比较,验证数字签名是否有效。  | 
        	
| VerifyData(Byte[], Byte[], HashAlgorithmName) | 
						 通过使用指定的哈希算法计算指定数据的哈希值,并将其与提供的签名进行比较,验证数字签名是否有效。  | 
        	
| VerifyData(Byte[], Byte[], HashAlgorithmName, DSASignatureFormat) | 
						 验证数字签名对于所提供的数据是否有效。  | 
        	
VerifyData(Byte[], Int32, Int32, Byte[], HashAlgorithmName, DSASignatureFormat)
- Source:
 - DSA.cs
 
- Source:
 - DSA.cs
 
- Source:
 - DSA.cs
 
验证数字签名对于所提供的数据是否有效。
public:
 bool VerifyData(cli::array <System::Byte> ^ data, int offset, int count, cli::array <System::Byte> ^ signature, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::DSASignatureFormat signatureFormat);
	public bool VerifyData (byte[] data, int offset, int count, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat);
	member this.VerifyData : byte[] * int * int * byte[] * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.DSASignatureFormat -> bool
	Public Function VerifyData (data As Byte(), offset As Integer, count As Integer, signature As Byte(), hashAlgorithm As HashAlgorithmName, signatureFormat As DSASignatureFormat) As Boolean
	参数
- data
 - Byte[]
 
包含已签名数据的数组。
- offset
 - Int32
 
              data 的已签名部分的起始索引。
- count
 - Int32
 
已签名的 data 的字节数。
- signature
 - Byte[]
 
要验证的签名。
- hashAlgorithm
 - HashAlgorithmName
 
用于对验证过程的数据进行哈希处理的哈希算法。
- signatureFormat
 - DSASignatureFormat
 
              signature 的编码格式。
返回
如果数字签名对所提供的数据有效,则为 true;否则为 false。
例外
              data 或 signature 为 null。
              signatureFormat 不是已知格式。
- 或 - offset 小于零。
- 或 - count 小于零。
-或- offset + count - 1 会导致超出 data 上限的索引。
              hashAlgorithm 具有 null 或空的 Name。
哈希处理或验证时出错。
适用于
VerifyData(Byte[], Int32, Int32, Byte[], HashAlgorithmName)
- Source:
 - DSA.cs
 
- Source:
 - DSA.cs
 
- Source:
 - DSA.cs
 
通过使用指定的哈希算法计算字节数组一个部分中数据的哈希值,并将其与提供的签名进行比较,验证数字签名是否有效。
public:
 virtual bool VerifyData(cli::array <System::Byte> ^ data, int offset, int count, cli::array <System::Byte> ^ signature, System::Security::Cryptography::HashAlgorithmName hashAlgorithm);
	public virtual bool VerifyData (byte[] data, int offset, int count, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);
	abstract member VerifyData : byte[] * int * int * byte[] * System.Security.Cryptography.HashAlgorithmName -> bool
override this.VerifyData : byte[] * int * int * byte[] * System.Security.Cryptography.HashAlgorithmName -> bool
	Public Overridable Function VerifyData (data As Byte(), offset As Integer, count As Integer, signature As Byte(), hashAlgorithm As HashAlgorithmName) As Boolean
	参数
- data
 - Byte[]
 
已签名的数据。
- offset
 - Int32
 
开始计算哈希的起始索引。
- count
 - Int32
 
要进行哈希处理的字节数。
- signature
 - Byte[]
 
要验证的签名数据。
- hashAlgorithm
 - HashAlgorithmName
 
要用于创建数据哈希值的哈希算法。
返回
如果数字签名有效,则为 true;否则为 false。
例外
适用于
VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, DSASignatureFormat)
- Source:
 - DSA.cs
 
- Source:
 - DSA.cs
 
- Source:
 - DSA.cs
 
验证数字签名对于所提供的数据是否有效。
public:
 bool VerifyData(ReadOnlySpan<System::Byte> data, ReadOnlySpan<System::Byte> signature, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::DSASignatureFormat signatureFormat);
	public bool VerifyData (ReadOnlySpan<byte> data, ReadOnlySpan<byte> signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat);
	member this.VerifyData : ReadOnlySpan<byte> * ReadOnlySpan<byte> * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.DSASignatureFormat -> bool
	Public Function VerifyData (data As ReadOnlySpan(Of Byte), signature As ReadOnlySpan(Of Byte), hashAlgorithm As HashAlgorithmName, signatureFormat As DSASignatureFormat) As Boolean
	参数
- data
 - ReadOnlySpan<Byte>
 
已签名的数据。
- signature
 - ReadOnlySpan<Byte>
 
要验证的签名。
- hashAlgorithm
 - HashAlgorithmName
 
用于对验证过程的数据进行哈希处理的哈希算法。
- signatureFormat
 - DSASignatureFormat
 
              signature 的编码格式。
返回
如果数字签名对所提供的数据有效,则为 true;否则为 false。
例外
              signatureFormat 不是已知格式。
哈希处理或验证时出错。
适用于
VerifyData(Stream, Byte[], HashAlgorithmName, DSASignatureFormat)
- Source:
 - DSA.cs
 
- Source:
 - DSA.cs
 
- Source:
 - DSA.cs
 
验证数字签名对于所提供的数据是否有效。
public:
 bool VerifyData(System::IO::Stream ^ data, cli::array <System::Byte> ^ signature, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::DSASignatureFormat signatureFormat);
	public bool VerifyData (System.IO.Stream data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat);
	member this.VerifyData : System.IO.Stream * byte[] * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.DSASignatureFormat -> bool
	Public Function VerifyData (data As Stream, signature As Byte(), hashAlgorithm As HashAlgorithmName, signatureFormat As DSASignatureFormat) As Boolean
	参数
- data
 - Stream
 
已签名的数据。
- signature
 - Byte[]
 
要验证的签名。
- hashAlgorithm
 - HashAlgorithmName
 
用于对验证过程的数据进行哈希处理的哈希算法。
- signatureFormat
 - DSASignatureFormat
 
              signature 的编码格式。
返回
如果数字签名对所提供的数据有效,则为 true;否则为 false。
例外
              data 或 signature 为 null。
              signatureFormat 不是已知格式。
              hashAlgorithm 具有 null 或空的 Name。
哈希处理或验证时出错。
适用于
VerifyData(Stream, Byte[], HashAlgorithmName)
- Source:
 - DSA.cs
 
- Source:
 - DSA.cs
 
- Source:
 - DSA.cs
 
通过使用指定的哈希算法计算指定流的哈希值,并将其与提供的签名进行比较,验证数字签名是否有效。
public:
 virtual bool VerifyData(System::IO::Stream ^ data, cli::array <System::Byte> ^ signature, System::Security::Cryptography::HashAlgorithmName hashAlgorithm);
	public virtual bool VerifyData (System.IO.Stream data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);
	abstract member VerifyData : System.IO.Stream * byte[] * System.Security.Cryptography.HashAlgorithmName -> bool
override this.VerifyData : System.IO.Stream * byte[] * System.Security.Cryptography.HashAlgorithmName -> bool
	Public Overridable Function VerifyData (data As Stream, signature As Byte(), hashAlgorithm As HashAlgorithmName) As Boolean
	参数
- data
 - Stream
 
已签名的数据。
- signature
 - Byte[]
 
要验证的签名数据。
- hashAlgorithm
 - HashAlgorithmName
 
要用于创建数据哈希值的哈希算法。
返回
如果数字签名有效,则为 true;否则为 false。
例外
适用于
VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName)
- Source:
 - DSA.cs
 
- Source:
 - DSA.cs
 
- Source:
 - DSA.cs
 
通过使用指定的哈希算法计算某字节范围内数据的哈希值,并将其与提供的签名进行比较,验证数字签名是否有效。
public:
 virtual bool VerifyData(ReadOnlySpan<System::Byte> data, ReadOnlySpan<System::Byte> signature, System::Security::Cryptography::HashAlgorithmName hashAlgorithm);
	public virtual bool VerifyData (ReadOnlySpan<byte> data, ReadOnlySpan<byte> signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);
	abstract member VerifyData : ReadOnlySpan<byte> * ReadOnlySpan<byte> * System.Security.Cryptography.HashAlgorithmName -> bool
override this.VerifyData : ReadOnlySpan<byte> * ReadOnlySpan<byte> * System.Security.Cryptography.HashAlgorithmName -> bool
	Public Overridable Function VerifyData (data As ReadOnlySpan(Of Byte), signature As ReadOnlySpan(Of Byte), hashAlgorithm As HashAlgorithmName) As Boolean
	参数
- data
 - ReadOnlySpan<Byte>
 
已签名的数据。
- signature
 - ReadOnlySpan<Byte>
 
要验证的签名。
- hashAlgorithm
 - HashAlgorithmName
 
要用于创建数据哈希值的哈希算法。
返回
如果数字签名有效,则为 true;否则为 false。
例外
适用于
VerifyData(Byte[], Byte[], HashAlgorithmName)
- Source:
 - DSA.cs
 
- Source:
 - DSA.cs
 
- Source:
 - DSA.cs
 
通过使用指定的哈希算法计算指定数据的哈希值,并将其与提供的签名进行比较,验证数字签名是否有效。
public:
 bool VerifyData(cli::array <System::Byte> ^ data, cli::array <System::Byte> ^ signature, System::Security::Cryptography::HashAlgorithmName hashAlgorithm);
	public bool VerifyData (byte[] data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);
	member this.VerifyData : byte[] * byte[] * System.Security.Cryptography.HashAlgorithmName -> bool
	Public Function VerifyData (data As Byte(), signature As Byte(), hashAlgorithm As HashAlgorithmName) As Boolean
	参数
- data
 - Byte[]
 
已签名的数据。
- signature
 - Byte[]
 
要验证的签名数据。
- hashAlgorithm
 - HashAlgorithmName
 
要用于创建数据哈希值的哈希算法。
返回
如果数字签名有效,则为 true;否则为 false。
例外
适用于
VerifyData(Byte[], Byte[], HashAlgorithmName, DSASignatureFormat)
- Source:
 - DSA.cs
 
- Source:
 - DSA.cs
 
- Source:
 - DSA.cs
 
验证数字签名对于所提供的数据是否有效。
public:
 bool VerifyData(cli::array <System::Byte> ^ data, cli::array <System::Byte> ^ signature, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::DSASignatureFormat signatureFormat);
	public bool VerifyData (byte[] data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat);
	member this.VerifyData : byte[] * byte[] * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.DSASignatureFormat -> bool
	Public Function VerifyData (data As Byte(), signature As Byte(), hashAlgorithm As HashAlgorithmName, signatureFormat As DSASignatureFormat) As Boolean
	参数
- data
 - Byte[]
 
已签名的数据。
- signature
 - Byte[]
 
要验证的签名。
- hashAlgorithm
 - HashAlgorithmName
 
用于对验证过程的数据进行哈希处理的哈希算法。
- signatureFormat
 - DSASignatureFormat
 
              signature 的编码格式。
返回
如果数字签名对所提供的数据有效,则为 true;否则为 false。
例外
              data 或 signature 为 null。
              signatureFormat 不是已知格式。
              hashAlgorithm 具有 null 或空的 Name。
哈希处理或验证时出错。