RSA.VerifyHash Metoda

Definicja

Przeciążenia

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

Sprawdza, czy podpis cyfrowy jest prawidłowy, określając wartość skrótu w podpisie przy użyciu określonego algorytmu wyznaczania wartości skrótu i uzupełniania oraz porównując go z podaną wartością skrótu.

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

Sprawdza, czy podpis cyfrowy jest prawidłowy, określając wartość skrótu w podpisie przy użyciu określonego algorytmu wyznaczania wartości skrótu i uzupełniania oraz porównując go z podaną wartością skrótu.

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

Źródło:
RSA.cs
Źródło:
RSA.cs
Źródło:
RSA.cs

Sprawdza, czy podpis cyfrowy jest prawidłowy, określając wartość skrótu w podpisie przy użyciu określonego algorytmu wyznaczania wartości skrótu i uzupełniania oraz porównując go z podaną wartością skrótu.

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

Parametry

hash
Byte[]

Wartość skrótu podpisanych danych.

signature
Byte[]

Dane podpisu do zweryfikowania.

hashAlgorithm
HashAlgorithmName

Algorytm skrótu użyty do utworzenia wartości skrótu.

padding
RSASignaturePadding

Tryb dopełniania.

Zwraca

true jeśli podpis jest prawidłowy; w przeciwnym razie , false.

Wyjątki

Klasa pochodna musi zastąpić tę metodę.

hash lub padding to null.

hashAlgorithm.Name jest lub nullEmpty.

padding jest nieznany lub nie jest obsługiwany przez tę implementację.

Dotyczy

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

Źródło:
RSA.cs
Źródło:
RSA.cs
Źródło:
RSA.cs

Sprawdza, czy podpis cyfrowy jest prawidłowy, określając wartość skrótu w podpisie przy użyciu określonego algorytmu wyznaczania wartości skrótu i uzupełniania oraz porównując go z podaną wartością skrótu.

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

Parametry

hash
ReadOnlySpan<Byte>

Wartość skrótu podpisanych danych.

signature
ReadOnlySpan<Byte>

Dane podpisu do zweryfikowania.

hashAlgorithm
HashAlgorithmName

Algorytm skrótu użyty do utworzenia wartości skrótu.

padding
RSASignaturePadding

Tryb dopełniania.

Zwraca

true jeśli podpis jest prawidłowy; w przeciwnym razie , false.

Wyjątki

hash lub padding to null.

hashAlgorithm.Name jest lub nullEmpty.

padding jest nieznany lub nie jest obsługiwany przez tę implementację.

Uwagi

Domyślną implementacją tej metody jest skopiowanie hash i signature do nowych tablic i wywołanie metody VerifyHash(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding). Typy pochodne powinny zastąpić tę metodę, aby uniknąć tworzenia tablicy pośredniej.

Dotyczy