ECDsaCng.VerifyData Método

Definição

Verifica uma assinatura digital.Verifies a digital signature.

Sobrecargas

VerifyData(Byte[], Byte[])

Verifica a assinatura digital dos dados especificados.Verifies the digital signature of the specified data.

VerifyData(Stream, Byte[])

Verifica uma assinatura digital do fluxo de dados especificado, lendo até o final do fluxo.Verifies the digital signature of the specified data stream, reading to the end of the stream.

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

Verifica uma assinatura digital para o tamanho especificado dos dados, começando no deslocamento indicado.Verifies a signature for the specified length of data, beginning at the specified offset.

VerifyData(Byte[], Byte[])

Verifica a assinatura digital dos dados especificados.Verifies the digital signature of the specified data.

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

Parâmetros

data
Byte[]

Os dados que receberam um sinal.The data that was signed.

signature
Byte[]

A assinatura a ser verificada.The signature to be verified.

Retornos

Boolean

true se a assinatura for válida; caso contrário, false.true if the signature is valid; otherwise, false.

Exceções

data ou signature é null.data or signature is null.

Comentários

Esse método gera uma assinatura para os dados fornecidos por hash dos dados de entrada usando a HashAlgorithm propriedade e, em seguida, assinando o resultado.This method generates a signature for the given data by hashing the input data using the HashAlgorithm property, and then signing the result.

Aplica-se a

VerifyData(Stream, Byte[])

Verifica uma assinatura digital do fluxo de dados especificado, lendo até o final do fluxo.Verifies the digital signature of the specified data stream, reading to the end of the stream.

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

Parâmetros

data
Stream

O fluxo de dados que foi assinado.The data stream that was signed.

signature
Byte[]

A assinatura a ser verificada.The signature to be verified.

Retornos

Boolean

true se a assinatura for válida; caso contrário, false.true if the signature is valid; otherwise, false.

Atributos

Exceções

data ou signature é null.data or signature is null.

Comentários

Esse método aplica hash aos dados de entrada usando a HashAlgorithm propriedade antes da verificação.This method hashes the input data by using the HashAlgorithm property before verification.

Aplica-se a

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

Verifica uma assinatura digital para o tamanho especificado dos dados, começando no deslocamento indicado.Verifies a signature for the specified length of data, beginning at the specified offset.

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

Parâmetros

data
Byte[]

Os dados que receberam um sinal.The data that was signed.

offset
Int32

O local nos dados no qual os dados assinados começam.The location in the data at which the signed data begins.

count
Int32

A extensão dos dados, em caracteres, após o offset que será assinado.The length of the data, in characters, following offset that will be signed.

signature
Byte[]

A assinatura a ser verificada.The signature to be verified.

Retornos

Boolean

true se a assinatura for válida; caso contrário, false.true if the signature is valid; otherwise, false.

Atributos

Exceções

offset ou count é menor que zero.offset or count is less then zero.

- ou --or- offset ou count é maior do que o tamanho da matriz de bytes passada no parâmetro data.offset or count is larger than the length of the byte array passed in the data parameter.

data ou signature é null.data or signature is null.

Comentários

Esse método aplica hash aos dados de entrada usando a HashAlgorithm propriedade antes da verificação.This method hashes the input data by using the HashAlgorithm property before verification.

Aplica-se a