SHA256.TryHashData(ReadOnlySpan<Byte>, Span<Byte>, Int32) 方法

定義

使用 SHA256 演算法嘗試計算資料的雜湊。

public:
 static bool TryHashData(ReadOnlySpan<System::Byte> source, Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
public static bool TryHashData (ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten);
static member TryHashData : ReadOnlySpan<byte> * Span<byte> * int -> bool
Public Shared Function TryHashData (source As ReadOnlySpan(Of Byte), destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean

參數

source
ReadOnlySpan<Byte>

要進行雜湊處理的資料。

destination
Span<Byte>

要接收雜湊值的緩衝區。

bytesWritten
Int32

當這個方法傳回時,寫入 destination 的位元組總數。

傳回

如果 destination 太小而無法保存計算的雜湊,則為 false;否則為 true

適用於