RSA.VerifyData RSA.VerifyData RSA.VerifyData RSA.VerifyData Method

Définition

Vérifie qu’une signature numérique est valide.Verifies that a digital signature is valid.

Surcharges

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

Vérifie qu’une signature numérique est valide en calculant la valeur de hachage des données indiquées à l’aide de l’algorithme de hachage et du remplissage spécifiés, et en la comparant à la signature fournie.Verifies that a digital signature is valid by calculating the hash value of the specified data using the specified hash algorithm and padding, and comparing it to the provided signature.

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

Vérifie qu’une signature numérique est valide en calculant la valeur de hachage du flux spécifié en utilisant l’algorithme de hachage et le remplissage spécifiés, et en la comparant à la signature fournie.Verifies that a digital signature is valid by calculating the hash value of the specified stream using the specified hash algorithm and padding, and comparing it to the provided signature.

VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding) VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding) VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding) VerifyData(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding)
VerifyData(Byte[], Int32, Int32, Byte[], HashAlgorithmName, RSASignaturePadding) VerifyData(Byte[], Int32, Int32, Byte[], HashAlgorithmName, RSASignaturePadding) VerifyData(Byte[], Int32, Int32, Byte[], HashAlgorithmName, RSASignaturePadding) VerifyData(Byte[], Int32, Int32, Byte[], HashAlgorithmName, RSASignaturePadding)

Vérifie qu’une signature numérique est valide en calculant la valeur de hachage des données dans une partie d’un tableau d’octets à l’aide de l’algorithme de hachage et du remplissage spécifiés, et en la comparant à la signature fournie.Verifies that a digital signature is valid by calculating the hash value of the data in a portion of a byte array using the specified hash algorithm and padding, and comparing it to the provided signature.

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

Vérifie qu’une signature numérique est valide en calculant la valeur de hachage des données indiquées à l’aide de l’algorithme de hachage et du remplissage spécifiés, et en la comparant à la signature fournie.Verifies that a digital signature is valid by calculating the hash value of the specified data using the specified hash algorithm and padding, and comparing it to the provided signature.

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

Paramètres

data
Byte[]

Données signées.The signed data.

signature
Byte[]

Données de la signature à vérifier.The signature data to be verified.

hashAlgorithm
HashAlgorithmName HashAlgorithmName HashAlgorithmName HashAlgorithmName

Algorithme de hachage utilisé pour créer la valeur de hachage des données.The hash algorithm used to create the hash value of the data.

padding
RSASignaturePadding RSASignaturePadding RSASignaturePadding 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

data a la valeur null.data is null.

- ou --or- signature a la valeur null.signature is null.

- ou --or- padding est null.padding is null.

hashAlgorithm.NamehashAlgorithm.Name est null ou Empty.is null or Empty.

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

Vérifie qu’une signature numérique est valide en calculant la valeur de hachage du flux spécifié en utilisant l’algorithme de hachage et le remplissage spécifiés, et en la comparant à la signature fournie.Verifies that a digital signature is valid by calculating the hash value of the specified stream using the specified hash algorithm and padding, and comparing it to the provided signature.

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

Paramètres

data
Stream Stream Stream Stream

Données signées.The signed data.

signature
Byte[]

Données de la signature à vérifier.The signature data to be verified.

hashAlgorithm
HashAlgorithmName HashAlgorithmName HashAlgorithmName HashAlgorithmName

Algorithme de hachage utilisé pour créer la valeur de hachage des données.The hash algorithm used to create the hash value of the data.

padding
RSASignaturePadding RSASignaturePadding RSASignaturePadding 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

data est null.data is null.

- ou --or- signature a la valeur null.signature is null.

- ou --or- padding a la valeur null.padding is null.

hashAlgorithm.NamehashAlgorithm.Name est null ou Empty.is null or Empty.

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

public:
 virtual bool VerifyData(ReadOnlySpan<System::Byte> data, ReadOnlySpan<System::Byte> signature, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::RSASignaturePadding ^ padding);
public virtual bool VerifyData (ReadOnlySpan<byte> data, ReadOnlySpan<byte> signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding);
abstract member VerifyData : ReadOnlySpan<byte> * ReadOnlySpan<byte> * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> bool
override this.VerifyData : ReadOnlySpan<byte> * ReadOnlySpan<byte> * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> bool
Public Overridable Function VerifyData (data As ReadOnlySpan(Of Byte), signature As ReadOnlySpan(Of Byte), hashAlgorithm As HashAlgorithmName, padding As RSASignaturePadding) As Boolean

Paramètres

signature
ReadOnlySpan<Byte>

Retours

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

Vérifie qu’une signature numérique est valide en calculant la valeur de hachage des données dans une partie d’un tableau d’octets à l’aide de l’algorithme de hachage et du remplissage spécifiés, et en la comparant à la signature fournie.Verifies that a digital signature is valid by calculating the hash value of the data in a portion of a byte array using the specified hash algorithm and padding, and comparing it to the provided signature.

public:
 virtual bool VerifyData(cli::array <System::Byte> ^ data, int offset, int count, cli::array <System::Byte> ^ signature, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::RSASignaturePadding ^ padding);
public virtual bool VerifyData (byte[] data, int offset, int count, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding);
abstract member VerifyData : byte[] * int * int * byte[] * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> bool
override this.VerifyData : byte[] * int * int * byte[] * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> bool
Public Overridable Function VerifyData (data As Byte(), offset As Integer, count As Integer, signature As Byte(), hashAlgorithm As HashAlgorithmName, padding As RSASignaturePadding) As Boolean

Paramètres

data
Byte[]

Données signées.The signed data.

offset
Int32 Int32 Int32 Int32

Index de départ à partir duquel calculer le hachage.The starting index at which to compute the hash.

count
Int32 Int32 Int32 Int32

Nombre d’octets à hacher.The number of bytes to hash.

signature
Byte[]

Données de la signature à vérifier.The signature data to be verified.

hashAlgorithm
HashAlgorithmName HashAlgorithmName HashAlgorithmName HashAlgorithmName

Algorithme de hachage utilisé pour créer la valeur de hachage des données.The hash algorithm used to create the hash value of the data.

padding
RSASignaturePadding RSASignaturePadding RSASignaturePadding 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

data est null.data is null.

- ou --or- signature a la valeur null.signature is null.

- ou --or- padding a la valeur null.padding is null.

hashAlgorithm.NamehashAlgorithm.Name est null ou Empty.is null or Empty.

offset est inférieur à zéro.offset is less than zero.

- ou --or- count est inférieur à zéro.count is less than zero.

- ou --or- offset + count - 1 génère un index qui dépasse la limite supérieure de data.offset + count - 1 results in an index that is beyond the upper bound of data.

S’applique à