SHA256.HashData Método

Definição

Sobrecargas

HashData(Byte[])

Computa o hash de dados usando o algoritmo SHA256.Computes the hash of data using the SHA256 algorithm.

HashData(ReadOnlySpan<Byte>)

Computa o hash de dados usando o algoritmo SHA256.Computes the hash of data using the SHA256 algorithm.

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

Computa o hash de dados usando o algoritmo SHA256.Computes the hash of data using the SHA256 algorithm.

HashData(Byte[])

Computa o hash de dados usando o algoritmo SHA256.Computes the hash of data using the SHA256 algorithm.

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()

Parâmetros

source
Byte[]

Os dados para hash.The data to hash.

Retornos

Byte[]

O hash dos dados.The hash of the data.

Exceções

source é null.source is null.

Aplica-se a

HashData(ReadOnlySpan<Byte>)

Computa o hash de dados usando o algoritmo SHA256.Computes the hash of data using the SHA256 algorithm.

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()

Parâmetros

source
ReadOnlySpan<Byte>

Os dados para hash.The data to hash.

Retornos

Byte[]

O hash dos dados.The hash of the data.

Aplica-se a

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

Computa o hash de dados usando o algoritmo SHA256.Computes the hash of data using the SHA256 algorithm.

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

Parâmetros

source
ReadOnlySpan<Byte>

Os dados para hash.The data to hash.

destination
Span<Byte>

O buffer que recebe o valor de hash.The buffer to receive the hash value.

Retornos

Int32

O número total de bytes gravados em destination.The total number of bytes written to destination.

Exceções

O buffer no destination é muito pequeno para manter o tamanho do hash calculado.The buffer in destination is too small to hold the calculated hash size. O algoritmo SHA256 sempre produz um hash de 256 bits ou 32 bytes.The SHA256 algorithm always produces a 256-bit hash, or 32 bytes.

Aplica-se a