HMACSHA256.HashData Método

Definição

Sobrecargas

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

Calcula o HMAC de um fluxo usando o algoritmo SHA256.

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

Calcula o HMAC de dados usando o algoritmo SHA256.

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

Calcula o HMAC de dados usando o algoritmo SHA256.

HashData(Byte[], Stream)

Calcula o HMAC de um fluxo usando o algoritmo SHA256.

HashData(Byte[], Byte[])

Calcula o HMAC de dados usando o algoritmo SHA256.

HashData(ReadOnlySpan<Byte>, Stream)

Calcula o HMAC de um fluxo usando o algoritmo SHA256.

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

Calcula o HMAC de um fluxo usando o algoritmo SHA256.

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

Parâmetros

key
ReadOnlySpan<Byte>

A chave HMAC.

source
Stream

O fluxo para HMAC.

destination
Span<Byte>

O buffer que receberá o valor de HMAC.

Retornos

Int32

O número total de bytes gravados em destination.

Exceções

source é null.

O buffer destination é muito pequeno para conter o tamanho do HMAC calculado. O algoritmo SHA256 sempre produz um HMAC de 256 bits ou 32 bytes.

-ou-

source não dá suporte à leitura.

Aplica-se a

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

Calcula o HMAC de dados usando o algoritmo SHA256.

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

Parâmetros

key
ReadOnlySpan<Byte>

A chave HMAC.

source
ReadOnlySpan<Byte>

Os dados para HMAC.

Retornos

Byte[]

O HMAC dos dados.

Aplica-se a

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

Calcula o HMAC de dados usando o algoritmo SHA256.

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

Parâmetros

key
ReadOnlySpan<Byte>

A chave HMAC.

source
ReadOnlySpan<Byte>

Os dados para HMAC.

destination
Span<Byte>

O buffer que receberá o valor de HMAC.

Retornos

Int32

O número total de bytes gravados em destination.

Exceções

O buffer no destination é muito pequeno para manter o tamanho do hash calculado. O algoritmo SHA256 sempre produz um HMAC de 256 bits ou 32 bytes.

Aplica-se a

HashData(Byte[], Stream)

Calcula o HMAC de um fluxo usando o algoritmo SHA256.

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

Parâmetros

key
Byte[]

A chave HMAC.

source
Stream

O fluxo para HMAC.

Retornos

Byte[]

O HMAC dos dados.

Exceções

key ou source é null.

source não dá suporte à leitura.

Aplica-se a

HashData(Byte[], Byte[])

Calcula o HMAC de dados usando o algoritmo SHA256.

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

Parâmetros

key
Byte[]

A chave HMAC.

source
Byte[]

Os dados para HMAC.

Retornos

Byte[]

O HMAC dos dados.

Exceções

key ou source é null.

Aplica-se a

HashData(ReadOnlySpan<Byte>, Stream)

Calcula o HMAC de um fluxo usando o algoritmo SHA256.

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

Parâmetros

key
ReadOnlySpan<Byte>

A chave HMAC.

source
Stream

O fluxo para HMAC.

Retornos

Byte[]

O HMAC dos dados.

Exceções

source é null.

source não dá suporte à leitura.

Aplica-se a