ECDsa.TryHashData メソッド

定義

指定したハッシュ アルゴリズムを使用して、指定した読み取り専用のバイト スパンのハッシュ値を指定された宛先に計算しようとします。

protected:
 virtual bool TryHashData(ReadOnlySpan<System::Byte> data, Span<System::Byte> destination, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, [Runtime::InteropServices::Out] int % bytesWritten);
protected virtual bool TryHashData(ReadOnlySpan<byte> data, Span<byte> destination, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out int bytesWritten);
abstract member TryHashData : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.HashAlgorithmName * int -> bool
override this.TryHashData : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.HashAlgorithmName * int -> bool
Protected Overridable Function TryHashData (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に書き込まれた合計バイト数が格納されます。 このパラメーターは、初期化されていないものとして扱われます。

返品

false destinationがハッシュ値を受け取るのに十分な長さでない場合は。

注釈

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

適用対象