ECDsa.TrySignData メソッド

定義

オーバーロード

TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, Int32)

指定したハッシュ アルゴリズムと現在のキーを使用して、指定した宛先に、指定したバイト型の読み取り専用スパン用の ECDSA デジタル署名の計算を試みます。

TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, DSASignatureFormat, Int32)

指定したデータの ECDSA 署名を指定した形式で作成し、指定したバッファーへの配置を試みます。

TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, Int32)

ソース:
ECDsa.cs
ソース:
ECDsa.cs
ソース:
ECDsa.cs

指定したハッシュ アルゴリズムと現在のキーを使用して、指定した宛先に、指定したバイト型の読み取り専用スパン用の ECDSA デジタル署名の計算を試みます。

public:
 virtual bool TrySignData(ReadOnlySpan<System::Byte> data, Span<System::Byte> destination, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, [Runtime::InteropServices::Out] int % bytesWritten);
public virtual bool TrySignData (ReadOnlySpan<byte> data, Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out int bytesWritten);
abstract member TrySignData : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.HashAlgorithmName * int -> bool
override this.TrySignData : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.HashAlgorithmName * int -> bool
Public Overridable Function TrySignData (data As ReadOnlySpan(Of Byte), destination As Span(Of Byte), hashAlgorithm As HashAlgorithmName, ByRef bytesWritten As Integer) As Boolean

パラメーター

data
ReadOnlySpan<Byte>

署名する対象のデータ。

destination
Span<Byte>

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

hashAlgorithm
HashAlgorithmName

署名のためのデータのハッシュに使用するアルゴリズム。

bytesWritten
Int32

このメソッドから制御が戻るときに、destination に書き込まれた合計バイト数。 このパラメーターは初期化前として処理されます。

戻り値

destination が署名を受け取るのに十分な長さでない場合は、false

適用対象

TrySignData(ReadOnlySpan<Byte>, Span<Byte>, HashAlgorithmName, DSASignatureFormat, Int32)

ソース:
ECDsa.cs
ソース:
ECDsa.cs
ソース:
ECDsa.cs

指定したデータの ECDSA 署名を指定した形式で作成し、指定したバッファーへの配置を試みます。

public:
 bool TrySignData(ReadOnlySpan<System::Byte> data, Span<System::Byte> destination, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::Security::Cryptography::DSASignatureFormat signatureFormat, [Runtime::InteropServices::Out] int % bytesWritten);
public bool TrySignData (ReadOnlySpan<byte> data, Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.DSASignatureFormat signatureFormat, out int bytesWritten);
member this.TrySignData : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.DSASignatureFormat * int -> bool
Public Function TrySignData (data As ReadOnlySpan(Of Byte), destination As Span(Of Byte), hashAlgorithm As HashAlgorithmName, signatureFormat As DSASignatureFormat, ByRef bytesWritten As Integer) As Boolean

パラメーター

data
ReadOnlySpan<Byte>

ハッシュおよび署名するデータ。

destination
Span<Byte>

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

hashAlgorithm
HashAlgorithmName

ハッシュ値を作成するために使用するハッシュ アルゴリズム。

signatureFormat
DSASignatureFormat

署名に使用するエンコード形式。

bytesWritten
Int32

このメソッドが戻るときに、destination に書き込まれたバイト数を示す値が含まれます。 このパラメーターは初期化前として処理されます。

戻り値

destination が署名を受け取るのに十分な大きさの場合は true。それ以外の場合は false

例外

signatureFormat は既知の形式ではありません。

hashAlgorithm には null または空の Name があります。

署名操作で発生したエラー。

適用対象