DSA.TryHashData メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定されたデータのハッシュ値を指定されたバッファーに計算しようとします。
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>
ハッシュするデータ。
- hashAlgorithm
- HashAlgorithmName
使用するハッシュ アルゴリズムの名前。
- bytesWritten
- Int32
このメソッドから制御が戻るときに、 destinationに書き込まれたバイト数を示す値が格納されます。
返品
true
destinationが結果を受け取るのに十分な大きさの場合は。それ以外の場合はfalse。
注釈
このメソッドの既定の実装では、 HashData(Byte[], Int32, Int32, HashAlgorithmName) を呼び出し、結果を destinationにコピーします。
派生型は、中間配列の作成を回避するために、このメソッドをオーバーライドする必要があります。