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

定義

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

public static bool TryHashData (ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten);

參數

source
ReadOnlySpan<Byte>

要進行雜湊處理的資料。

destination
Span<Byte>

要接收雜湊值的緩衝區。

bytesWritten
Int32

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

傳回

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

適用於

產品 版本
.NET 5, 6, 7, 8, 9