RSA.VerifyHash Método
Definição
Sobrecargas
| VerifyHash(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding) |
Verifica se uma assinatura digital é válida determinando o valor de hash na assinatura usando o preenchimento e o algoritmo de hash especificados e comparando-a ao valor de hash fornecido.Verifies that a digital signature is valid by determining the hash value in the signature using the specified hash algorithm and padding, and comparing it to the provided hash value. |
| VerifyHash(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding) |
Verifica se uma assinatura digital é válida determinando o valor de hash na assinatura usando o preenchimento e o algoritmo de hash especificados e comparando-a ao valor de hash fornecido.Verifies that a digital signature is valid by determining the hash value in the signature using the specified hash algorithm and padding, and comparing it to the provided hash value. |
VerifyHash(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding)
Verifica se uma assinatura digital é válida determinando o valor de hash na assinatura usando o preenchimento e o algoritmo de hash especificados e comparando-a ao valor de hash fornecido.Verifies that a digital signature is valid by determining the hash value in the signature using the specified hash algorithm and padding, and comparing it to the provided hash value.
public:
virtual bool VerifyHash(cli::array <System::Byte> ^ hash, cli::array <System::Byte> ^ signature, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::RSASignaturePadding ^ padding);
public:
abstract bool VerifyHash(cli::array <System::Byte> ^ hash, cli::array <System::Byte> ^ signature, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::RSASignaturePadding ^ padding);
public virtual bool VerifyHash (byte[] hash, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding);
public abstract bool VerifyHash (byte[] hash, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding);
abstract member VerifyHash : byte[] * byte[] * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> bool
override this.VerifyHash : byte[] * byte[] * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> bool
abstract member VerifyHash : byte[] * byte[] * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> bool
Public Overridable Function VerifyHash (hash As Byte(), signature As Byte(), hashAlgorithm As HashAlgorithmName, padding As RSASignaturePadding) As Boolean
Public MustOverride Function VerifyHash (hash As Byte(), signature As Byte(), hashAlgorithm As HashAlgorithmName, padding As RSASignaturePadding) As Boolean
Parâmetros
- hash
- Byte[]
O valor de hash dos dados assinados.The hash value of the signed data.
- signature
- Byte[]
Os dados de assinatura a serem verificados.The signature data to be verified.
- hashAlgorithm
- HashAlgorithmName
O algoritmo de hash usado para criar o valor de hash.The hash algorithm used to create the hash value.
- padding
- RSASignaturePadding
O modo de preenchimento.The padding mode.
Retornos
true se a assinatura for válida; caso contrário, false.true if the signature is valid; otherwise, false.
Exceções
Uma classe derivada deve substituir esse método.A derived class must override this method.
hash ou padding é null.hash or padding is null.
padding é desconhecido ou não há suporte para ele nesta implementação.padding is unknown, or not supported by this implementation.
Aplica-se a
VerifyHash(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding)
Verifica se uma assinatura digital é válida determinando o valor de hash na assinatura usando o preenchimento e o algoritmo de hash especificados e comparando-a ao valor de hash fornecido.Verifies that a digital signature is valid by determining the hash value in the signature using the specified hash algorithm and padding, and comparing it to the provided hash value.
public:
virtual bool VerifyHash(ReadOnlySpan<System::Byte> hash, ReadOnlySpan<System::Byte> signature, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::RSASignaturePadding ^ padding);
public virtual bool VerifyHash (ReadOnlySpan<byte> hash, ReadOnlySpan<byte> signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding);
abstract member VerifyHash : ReadOnlySpan<byte> * ReadOnlySpan<byte> * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> bool
override this.VerifyHash : ReadOnlySpan<byte> * ReadOnlySpan<byte> * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> bool
Public Overridable Function VerifyHash (hash As ReadOnlySpan(Of Byte), signature As ReadOnlySpan(Of Byte), hashAlgorithm As HashAlgorithmName, padding As RSASignaturePadding) As Boolean
Parâmetros
- hash
- ReadOnlySpan<Byte>
O valor de hash dos dados assinados.The hash value of the signed data.
- signature
- ReadOnlySpan<Byte>
Os dados de assinatura a serem verificados.The signature data to be verified.
- hashAlgorithm
- HashAlgorithmName
O algoritmo de hash usado para criar o valor de hash.The hash algorithm used to create the hash value.
- padding
- RSASignaturePadding
O modo de preenchimento.The padding mode.
Retornos
true se a assinatura for válida; caso contrário, false.true if the signature is valid; otherwise, false.
Exceções
hash ou padding é null.hash or padding is null.
padding é desconhecido ou não há suporte para ele nesta implementação.padding is unknown, or not supported by this implementation.
Comentários
A implementação padrão desse método é copiar hash e signature para novas matrizes e chamar VerifyHash(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding) .The default implementation of this method is to copy hash and signature to new arrays and call VerifyHash(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding).
Tipos derivados devem substituir esse método para evitar a criação de matriz intermediária.Derived types should override this method to avoid the intermediate array creation.