RSA.SignHash メソッド

定義

オーバーロード

SignHash(Byte[], HashAlgorithmName, RSASignaturePadding)

派生クラスでオーバーライドされると、指定されたパディングを使用して、指定されたハッシュ値の署名を計算します。

SignHash(ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding)

指定したパディングを使用して、指定したハッシュ値の署名を計算します。

SignHash(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, RSASignaturePadding)

現在のキーを使用してハッシュに署名し、指定されたバッファーに署名を書き込みます。

SignHash(Byte[], HashAlgorithmName, RSASignaturePadding)

ソース:
RSA.cs
ソース:
RSA.cs
ソース:
RSA.cs

派生クラスでオーバーライドされると、指定されたパディングを使用して、指定されたハッシュ値の署名を計算します。

public:
 virtual cli::array <System::Byte> ^ SignHash(cli::array <System::Byte> ^ hash, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::RSASignaturePadding ^ padding);
public:
 abstract cli::array <System::Byte> ^ SignHash(cli::array <System::Byte> ^ hash, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::RSASignaturePadding ^ padding);
public virtual byte[] SignHash (byte[] hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding);
public abstract byte[] SignHash (byte[] hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding);
abstract member SignHash : byte[] * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> byte[]
override this.SignHash : byte[] * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> byte[]
abstract member SignHash : byte[] * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> byte[]
Public Overridable Function SignHash (hash As Byte(), hashAlgorithm As HashAlgorithmName, padding As RSASignaturePadding) As Byte()
Public MustOverride Function SignHash (hash As Byte(), hashAlgorithm As HashAlgorithmName, padding As RSASignaturePadding) As Byte()

パラメーター

hash
Byte[]

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

hashAlgorithm
HashAlgorithmName

データのハッシュ値を作成するために使用されるハッシュ アルゴリズム。

padding
RSASignaturePadding

パディング。

戻り値

Byte[]

指定されたハッシュ値の RSA 署名。

例外

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

data または paddingnull です。

hashAlgorithm.Namenull または Empty です。

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

または

このインスタンスでは公開キーのみ表されます。

または

署名の作成でエラーが発生しました。

こちらもご覧ください

適用対象

SignHash(ReadOnlySpan<Byte>, HashAlgorithmName, RSASignaturePadding)

ソース:
RSA.cs
ソース:
RSA.cs
ソース:
RSA.cs

指定したパディングを使用して、指定したハッシュ値の署名を計算します。

public:
 cli::array <System::Byte> ^ SignHash(ReadOnlySpan<System::Byte> hash, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::RSASignaturePadding ^ padding);
public byte[] SignHash (ReadOnlySpan<byte> hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding);
member this.SignHash : ReadOnlySpan<byte> * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> byte[]
Public Function SignHash (hash As ReadOnlySpan(Of Byte), hashAlgorithm As HashAlgorithmName, padding As RSASignaturePadding) As Byte()

パラメーター

hash
ReadOnlySpan<Byte>

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

hashAlgorithm
HashAlgorithmName

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

padding
RSASignaturePadding

パディング モード。

戻り値

Byte[]

指定されたハッシュ値の RSA 署名。

例外

padding または hashAlgorithmの が Name です null

hashAlgorithm's Name は空の文字列です。

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

または

このインスタンスでは公開キーのみ表されます。

または

署名の作成でエラーが発生しました。

適用対象

SignHash(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, RSASignaturePadding)

ソース:
RSA.cs
ソース:
RSA.cs
ソース:
RSA.cs

現在のキーを使用してハッシュに署名し、指定されたバッファーに署名を書き込みます。

public:
 int SignHash(ReadOnlySpan<System::Byte> hash, Span<System::Byte> destination, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::RSASignaturePadding ^ padding);
public int SignHash (ReadOnlySpan<byte> hash, Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding);
member this.SignHash : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.RSASignaturePadding -> int
Public Function SignHash (hash As ReadOnlySpan(Of Byte), destination As Span(Of Byte), hashAlgorithm As HashAlgorithmName, padding As RSASignaturePadding) As Integer

パラメーター

hash
ReadOnlySpan<Byte>

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

destination
Span<Byte>

RSA 署名を受け取るバッファー。

hashAlgorithm
HashAlgorithmName

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

padding
RSASignaturePadding

パディング モード。

戻り値

destination に書き込まれた合計バイト数。

例外

padding または hashAlgorithmの が Name です null

hashAlgorithm's Name は空の文字列です。

\- または -

destination バッファーが小さすぎて署名を保持できません。

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

または

このインスタンスでは公開キーのみ表されます。

または

署名の作成でエラーが発生しました。

適用対象