RSA.VerifyHash メソッド

定義

オーバーロード

名前 説明
VerifyHash(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding)

指定したハッシュ アルゴリズムとパディングを使用して署名のハッシュ値を決定し、指定されたハッシュ値と比較することで、デジタル署名が有効であることを確認します。

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

指定したハッシュ アルゴリズムとパディングを使用して署名のハッシュ値を決定し、指定されたハッシュ値と比較することで、デジタル署名が有効であることを確認します。

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

指定したハッシュ アルゴリズムとパディングを使用して署名のハッシュ値を決定し、指定されたハッシュ値と比較することで、デジタル署名が有効であることを確認します。

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

パラメーター

hash
Byte[]

署名されたデータのハッシュ値。

signature
Byte[]

検証する署名データ。

hashAlgorithm
HashAlgorithmName

ハッシュ値の作成に使用されるハッシュ アルゴリズム。

padding
RSASignaturePadding

埋め込みモード。

返品

true 署名が有効な場合。それ以外の場合は false

例外

派生クラスは、このメソッドをオーバーライドする必要があります。

hash または paddingnull

hashAlgorithm.Namenull または Empty

padding が不明であるか、この実装でサポートされていません。

適用対象

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

指定したハッシュ アルゴリズムとパディングを使用して署名のハッシュ値を決定し、指定されたハッシュ値と比較することで、デジタル署名が有効であることを確認します。

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

パラメーター

hash
ReadOnlySpan<Byte>

署名されたデータのハッシュ値。

signature
ReadOnlySpan<Byte>

検証する署名データ。

hashAlgorithm
HashAlgorithmName

ハッシュ値の作成に使用されるハッシュ アルゴリズム。

padding
RSASignaturePadding

埋め込みモード。

返品

true 署名が有効な場合。それ以外の場合は false

例外

hash または paddingnull

hashAlgorithm.Namenull または Empty

padding が不明であるか、この実装でサポートされていません。

注釈

このメソッドの既定の実装では、 hashsignature を新しい配列にコピーし、 VerifyHash(Byte[], Byte[], HashAlgorithmName, RSASignaturePadding)を呼び出します。 派生型は、中間配列の作成を回避するために、このメソッドをオーバーライドする必要があります。

適用対象