RSA.VerifyHash Metoda
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Přetížení
| Name | Description |
|---|---|
| VerifyHash(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding) |
Ověří platnost digitálního podpisu tak, že určí hodnotu hash v podpisu pomocí zadaného hash algoritmu a odsazení a porovná ji s zadanou hodnotou hash. |
| VerifyHash(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding) |
Ověří platnost digitálního podpisu tak, že určí hodnotu hash v podpisu pomocí zadaného hash algoritmu a odsazení a porovná ji s zadanou hodnotou hash. |
VerifyHash(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding)
- Zdroj:
- RSA.cs
- Zdroj:
- RSA.cs
- Zdroj:
- RSA.cs
- Zdroj:
- RSA.cs
Ověří platnost digitálního podpisu tak, že určí hodnotu hash v podpisu pomocí zadaného hash algoritmu a odsazení a porovná ji s zadanou hodnotou hash.
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[]
Hodnota hash podepsaných dat.
- signature
- Byte[]
Data podpisu, která se mají ověřit.
- hashAlgorithm
- HashAlgorithmName
Hashovací algoritmus použitý k vytvoření hodnoty hash.
- padding
- RSASignaturePadding
Režim odsazení.
Návraty
truepokud je podpis platný; v opačném případě . false
Výjimky
Odvozená třída musí tuto metodu přepsat.
hash nebo padding je null.
padding je neznámý nebo tato implementace nepodporuje.
Platí pro
VerifyHash(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding)
- Zdroj:
- RSA.cs
- Zdroj:
- RSA.cs
- Zdroj:
- RSA.cs
- Zdroj:
- RSA.cs
Ověří platnost digitálního podpisu tak, že určí hodnotu hash v podpisu pomocí zadaného hash algoritmu a odsazení a porovná ji s zadanou hodnotou hash.
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>
Hodnota hash podepsaných dat.
- signature
- ReadOnlySpan<Byte>
Data podpisu, která se mají ověřit.
- hashAlgorithm
- HashAlgorithmName
Hashovací algoritmus použitý k vytvoření hodnoty hash.
- padding
- RSASignaturePadding
Režim odsazení.
Návraty
truepokud je podpis platný; v opačném případě . false
Výjimky
hash nebo padding je null.
padding je neznámý nebo tato implementace nepodporuje.
Poznámky
Výchozí implementací této metody je kopírování hash a signature do nových polí a volání VerifyHash(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding).
Odvozené typy by měly přepsat tuto metodu, aby se zabránilo vytvoření zprostředkujícího pole.