ECDsaCng.VerifyData 方法

定義

驗證數位簽章。

多載

VerifyData(Byte[], Byte[])

驗證所指定資料的數位簽章。

VerifyData(Stream, Byte[])

驗證所指定資料流的數位簽章,並且讀取至資料流尾端。

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

驗證所指定資料長度的簽章,以指定的位移開頭。

VerifyData(Byte[], Byte[])

來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs

驗證所指定資料的數位簽章。

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

參數

data
Byte[]

已簽署的資料。

signature
Byte[]

要驗證的簽章。

傳回

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

例外狀況

datasignaturenull

備註

此方法會使用 HashAlgorithm 屬性雜湊輸入資料,然後簽署結果,以產生指定資料的簽章。

適用於

VerifyData(Stream, Byte[])

來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs

驗證所指定資料流的數位簽章,並且讀取至資料流尾端。

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

參數

data
Stream

已簽署的資料流。

signature
Byte[]

要驗證的簽章。

傳回

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

屬性

例外狀況

datasignaturenull

備註

這個方法會在驗證之前使用 HashAlgorithm 屬性雜湊輸入資料。

適用於

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

來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs

驗證所指定資料長度的簽章,以指定的位移開頭。

public:
 bool VerifyData(cli::array <System::Byte> ^ data, int offset, int count, cli::array <System::Byte> ^ signature);
public bool VerifyData (byte[] data, int offset, int count, byte[] signature);
[System.Security.SecurityCritical]
public bool VerifyData (byte[] data, int offset, int count, byte[] signature);
override this.VerifyData : byte[] * int * int * byte[] -> bool
[<System.Security.SecurityCritical>]
member this.VerifyData : byte[] * int * int * byte[] -> bool
member this.VerifyData : byte[] * int * int * byte[] -> bool
Public Function VerifyData (data As Byte(), offset As Integer, count As Integer, signature As Byte()) As Boolean

參數

data
Byte[]

已簽署的資料。

offset
Int32

簽署的資料在資料中開始的位置。

count
Int32

資料的長度 (以字元為單位),依照將簽署的 offset

signature
Byte[]

要驗證的簽章。

傳回

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

屬性

例外狀況

offsetcount 小於零。

-或-

offsetcount 大於在 data 參數中傳遞的位元組陣列長度。

datasignaturenull

備註

這個方法會在驗證之前使用 HashAlgorithm 屬性雜湊輸入資料。

適用於