SHA384.HashData 方法

定义

重载

HashData(Byte[])

使用 SHA384 算法计算数据的哈希。

HashData(Stream)

使用 SHA384 算法计算流的哈希。

HashData(ReadOnlySpan<Byte>)

使用 SHA384 算法计算数据的哈希。

HashData(Stream, Span<Byte>)

使用 SHA384 算法计算流的哈希。

HashData(ReadOnlySpan<Byte>, Span<Byte>)

使用 SHA384 算法计算数据的哈希。

HashData(Byte[])

使用 SHA384 算法计算数据的哈希。

public:
 static cli::array <System::Byte> ^ HashData(cli::array <System::Byte> ^ source);
public static byte[] HashData (byte[] source);
static member HashData : byte[] -> byte[]
Public Shared Function HashData (source As Byte()) As Byte()

参数

source
Byte[]

要哈希的数据。

返回

Byte[]

数据的哈希。

例外

source 上声明的默认值为 null

适用于

HashData(Stream)

使用 SHA384 算法计算流的哈希。

public:
 static cli::array <System::Byte> ^ HashData(System::IO::Stream ^ source);
public static byte[] HashData (System.IO.Stream source);
static member HashData : System.IO.Stream -> byte[]
Public Shared Function HashData (source As Stream) As Byte()

参数

source
Stream

要哈希的流。

返回

Byte[]

数据的哈希。

例外

source 上声明的默认值为 null

source 不支持读取。

适用于

HashData(ReadOnlySpan<Byte>)

使用 SHA384 算法计算数据的哈希。

public:
 static cli::array <System::Byte> ^ HashData(ReadOnlySpan<System::Byte> source);
public static byte[] HashData (ReadOnlySpan<byte> source);
static member HashData : ReadOnlySpan<byte> -> byte[]
Public Shared Function HashData (source As ReadOnlySpan(Of Byte)) As Byte()

参数

source
ReadOnlySpan<Byte>

要哈希的数据。

返回

Byte[]

数据的哈希。

适用于

HashData(Stream, Span<Byte>)

使用 SHA384 算法计算流的哈希。

public:
 static int HashData(System::IO::Stream ^ source, Span<System::Byte> destination);
public static int HashData (System.IO.Stream source, Span<byte> destination);
static member HashData : System.IO.Stream * Span<byte> -> int
Public Shared Function HashData (source As Stream, destination As Span(Of Byte)) As Integer

参数

source
Stream

要哈希的流。

destination
Span<Byte>

要接收哈希值的缓冲区。

返回

Int32

写入 destination 的总字节数。

例外

source 上声明的默认值为 null

destination 中的缓冲区太小,无法容纳计算所得的哈希大小。 SHA384 算法始终会生成 384 位的哈希或 48 个字节。

-或-

source 不支持读取。

适用于

HashData(ReadOnlySpan<Byte>, Span<Byte>)

使用 SHA384 算法计算数据的哈希。

public:
 static int HashData(ReadOnlySpan<System::Byte> source, Span<System::Byte> destination);
public static int HashData (ReadOnlySpan<byte> source, Span<byte> destination);
static member HashData : ReadOnlySpan<byte> * Span<byte> -> int
Public Shared Function HashData (source As ReadOnlySpan(Of Byte), destination As Span(Of Byte)) As Integer

参数

source
ReadOnlySpan<Byte>

要哈希的数据。

destination
Span<Byte>

要接收哈希值的缓冲区。

返回

Int32

写入 destination 的总字节数。

例外

destination 中的缓冲区太小,无法容纳计算所得的哈希大小。 SHA384 算法始终会生成 384 位的哈希或 48 个字节。

适用于