RSA.VerifyHash Méthode
Définition
Surcharges
VerifyHash(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding) |
Vérifie qu’une signature numérique est valide en déterminant la valeur de hachage dans la signature en utilisant l’algorithme de hachage et le remplissage spécifiés, et en la comparant à la valeur de hachage fournie.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) |
Vérifie qu’une signature numérique est valide en déterminant la valeur de hachage dans la signature en utilisant l’algorithme de hachage et le remplissage spécifiés, et en la comparant à la valeur de hachage fournie.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)
Vérifie qu’une signature numérique est valide en déterminant la valeur de hachage dans la signature en utilisant l’algorithme de hachage et le remplissage spécifiés, et en la comparant à la valeur de hachage fournie.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
Paramètres
- hash
- Byte[]
Valeur de hachage des données signées.The hash value of the signed data.
- signature
- Byte[]
Données de la signature à vérifier.The signature data to be verified.
- hashAlgorithm
- HashAlgorithmName
Algorithme de hachage utilisé pour créer la valeur de hachage.The hash algorithm used to create the hash value.
- padding
- RSASignaturePadding
Mode de remplissage.The padding mode.
Retours
true
si la signature est valide ; sinon, false
.true
if the signature is valid; otherwise, false
.
Exceptions
Une classe dérivée doit remplacer cette méthode.A derived class must override this method.
hash
ou padding
est null
.hash
or padding
is null
.
padding
est inconnu ou n’est pas pris en charge par cette implémentation.padding
is unknown, or not supported by this implementation.
S’applique à
VerifyHash(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding)
Vérifie qu’une signature numérique est valide en déterminant la valeur de hachage dans la signature en utilisant l’algorithme de hachage et le remplissage spécifiés, et en la comparant à la valeur de hachage fournie.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
Paramètres
- hash
- ReadOnlySpan<Byte>
Valeur de hachage des données signées.The hash value of the signed data.
- signature
- ReadOnlySpan<Byte>
Données de la signature à vérifier.The signature data to be verified.
- hashAlgorithm
- HashAlgorithmName
Algorithme de hachage utilisé pour créer la valeur de hachage.The hash algorithm used to create the hash value.
- padding
- RSASignaturePadding
Mode de remplissage.The padding mode.
Retours
true
si la signature est valide ; sinon, false
.true
if the signature is valid; otherwise, false
.
Exceptions
hash
ou padding
est null
.hash
or padding
is null
.
padding
est inconnu ou n’est pas pris en charge par cette implémentation.padding
is unknown, or not supported by this implementation.
Remarques
L’implémentation par défaut de cette méthode consiste à copier hash
et signature
à de nouveaux tableaux et à appeler 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).
Les types dérivés doivent remplacer cette méthode pour éviter la création de tableau intermédiaire.Derived types should override this method to avoid the intermediate array creation.