ECDsa.VerifyData 方法

定義

確認數位簽章適用於目前金鑰和使用所指定雜湊演算法提供的資料。

多載

VerifyData(Byte[], Byte[], HashAlgorithmName)

確認數位簽章適用於目前金鑰和使用所指定雜湊演算法提供的資料。

VerifyData(Stream, Byte[], HashAlgorithmName)

確認數位簽章適用於目前金鑰和使用所指定雜湊演算法提供的資料。

VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName)

確認數位簽章適用於目前金鑰和使用所指定雜湊演算法提供的資料。

VerifyData(Byte[], Byte[], HashAlgorithmName, DSASignatureFormat)

驗證數位簽章對提供的資料是否有效。

VerifyData(Stream, Byte[], HashAlgorithmName, DSASignatureFormat)

驗證數位簽章對提供的資料是否有效。

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

驗證數位簽章對提供的資料是否有效。

VerifyData(Byte[], Int32, Int32, Byte[], HashAlgorithmName)

確認數位簽章適用於目前金鑰和使用所指定雜湊演算法提供的資料部分。

VerifyData(Byte[], Int32, Int32, Byte[], HashAlgorithmName, DSASignatureFormat)

驗證數位簽章對提供的資料是否有效。

VerifyData(Byte[], Byte[], HashAlgorithmName)

來源:
ECDsa.cs
來源:
ECDsa.cs
來源:
ECDsa.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

例外狀況

datanull

-或-

signaturenull

hashAlgorithm.NamenullEmpty

適用於

VerifyData(Stream, Byte[], HashAlgorithmName)

來源:
ECDsa.cs
來源:
ECDsa.cs
來源:
ECDsa.cs

確認數位簽章適用於目前金鑰和使用所指定雜湊演算法提供的資料。

public:
 bool VerifyData(System::IO::Stream ^ data, cli::array <System::Byte> ^ signature, System::Security::Cryptography::HashAlgorithmName hashAlgorithm);
public bool VerifyData (System.IO.Stream data, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm);
member this.VerifyData : System.IO.Stream * byte[] * System.Security.Cryptography.HashAlgorithmName -> bool
Public Function VerifyData (data As Stream, signature As Byte(), hashAlgorithm As HashAlgorithmName) As Boolean

參數

data
Stream

已簽署的資料。

signature
Byte[]

要驗證的簽章資料。

hashAlgorithm
HashAlgorithmName

用來建立該資料雜湊值的雜湊演算法。

傳回

如果簽章有效則為 true,否則為 false

例外狀況

datanull

-或-

signaturenull

hashAlgorithm.NamenullEmpty

適用於

VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName)

來源:
ECDsa.cs
來源:
ECDsa.cs
來源:
ECDsa.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

例外狀況

hashAlgorithm.NamenullEmpty

適用於

VerifyData(Byte[], Byte[], HashAlgorithmName, DSASignatureFormat)

來源:
ECDsa.cs
來源:
ECDsa.cs
來源:
ECDsa.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

例外狀況

datasignaturenull

signatureFormat 不是已知的格式。

hashAlgorithm 具有 null 或空白 Name

雜湊處理或驗證作業發生錯誤。

適用於

VerifyData(Stream, Byte[], HashAlgorithmName, DSASignatureFormat)

來源:
ECDsa.cs
來源:
ECDsa.cs
來源:
ECDsa.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

例外狀況

datasignaturenull

signatureFormat 不是已知的格式。

hashAlgorithm 具有 null 或空白 Name

雜湊處理或驗證作業發生錯誤。

適用於

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

來源:
ECDsa.cs
來源:
ECDsa.cs
來源:
ECDsa.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(Byte[], Int32, Int32, Byte[], HashAlgorithmName)

來源:
ECDsa.cs
來源:
ECDsa.cs
來源:
ECDsa.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

例外狀況

datanull

-或-

signaturenull

hashAlgorithm.NamenullEmpty

offset 小於零。

-或-

count 小於零。

-或-

offset + count - 1 產生的索引超出 data 上限。

適用於

VerifyData(Byte[], Int32, Int32, Byte[], HashAlgorithmName, DSASignatureFormat)

來源:
ECDsa.cs
來源:
ECDsa.cs
來源:
ECDsa.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

例外狀況

datasignaturenull

signatureFormat 不是已知的格式。

-或-

offset 小於零。

-或-

count 小於零。

-或-

offset + count - 1 產生的索引超出 data 上限。

hashAlgorithm 具有 null 或空白 Name

雜湊處理或驗證作業發生錯誤。

適用於