Condividi tramite


SP800108HmacCounterKdf.DeriveBytes Metodo

Definizione

Overload

DeriveBytes(Byte[], HashAlgorithmName, Byte[], Byte[], Int32)

Deriva una chiave di una lunghezza specificata.

DeriveBytes(Byte[], HashAlgorithmName, String, String, Int32)

Deriva una chiave di una lunghezza specificata.

DeriveBytes(ReadOnlySpan<Byte>, HashAlgorithmName, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32)

Deriva una chiave di una lunghezza specificata.

DeriveBytes(ReadOnlySpan<Byte>, HashAlgorithmName, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>)

Riempie un buffer con una chiave derivata.

DeriveBytes(ReadOnlySpan<Byte>, HashAlgorithmName, ReadOnlySpan<Char>, ReadOnlySpan<Char>, Int32)

Deriva una chiave di una lunghezza specificata.

DeriveBytes(ReadOnlySpan<Byte>, HashAlgorithmName, ReadOnlySpan<Char>, ReadOnlySpan<Char>, Span<Byte>)

Riempie un buffer con una chiave derivata.

DeriveBytes(Byte[], HashAlgorithmName, Byte[], Byte[], Int32)

Origine:
SP800108HmacCounterKdf.cs
Origine:
SP800108HmacCounterKdf.cs

Deriva una chiave di una lunghezza specificata.

public:
 static cli::array <System::Byte> ^ DeriveBytes(cli::array <System::Byte> ^ key, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, cli::array <System::Byte> ^ label, cli::array <System::Byte> ^ context, int derivedKeyLengthInBytes);
public static byte[] DeriveBytes (byte[] key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] label, byte[] context, int derivedKeyLengthInBytes);
static member DeriveBytes : byte[] * System.Security.Cryptography.HashAlgorithmName * byte[] * byte[] * int -> byte[]
Public Shared Function DeriveBytes (key As Byte(), hashAlgorithm As HashAlgorithmName, label As Byte(), context As Byte(), derivedKeyLengthInBytes As Integer) As Byte()

Parametri

key
Byte[]

Chiave di derivazione della chiave.

hashAlgorithm
HashAlgorithmName

Algoritmo HMAC.

label
Byte[]

Etichetta che identifica lo scopo della chiave derivata.

context
Byte[]

Contesto contenente informazioni correlate alla chiave derivata.

derivedKeyLengthInBytes
Int32

Lunghezza in byte della chiave derivata.

Restituisce

Byte[]

Matrice contenente la chiave derivata.

Eccezioni

key è null.

-oppure-

label è null.

-oppure-

context è null.

-oppure-

hashAlgorithm ha un oggetto Name che è null.

hashAlgorithm ha un oggetto Name vuoto.

derivedKeyLengthInBytes è negativo o maggiore del numero massimo di byte che è possibile derivare.

hashAlgorithm non è un algoritmo hash noto o supportato.

La piattaforma corrente non ha un'implementazione supportata di HMAC.

Si applica a

DeriveBytes(Byte[], HashAlgorithmName, String, String, Int32)

Origine:
SP800108HmacCounterKdf.cs
Origine:
SP800108HmacCounterKdf.cs

Deriva una chiave di una lunghezza specificata.

public:
 static cli::array <System::Byte> ^ DeriveBytes(cli::array <System::Byte> ^ key, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::String ^ label, System::String ^ context, int derivedKeyLengthInBytes);
public static byte[] DeriveBytes (byte[] key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, string label, string context, int derivedKeyLengthInBytes);
static member DeriveBytes : byte[] * System.Security.Cryptography.HashAlgorithmName * string * string * int -> byte[]
Public Shared Function DeriveBytes (key As Byte(), hashAlgorithm As HashAlgorithmName, label As String, context As String, derivedKeyLengthInBytes As Integer) As Byte()

Parametri

key
Byte[]

Chiave di derivazione della chiave.

hashAlgorithm
HashAlgorithmName

Algoritmo HMAC.

label
String

Etichetta che identifica lo scopo della chiave derivata.

context
String

Contesto contenente informazioni correlate alla chiave derivata.

derivedKeyLengthInBytes
Int32

Lunghezza in byte della chiave derivata.

Restituisce

Byte[]

Matrice contenente la chiave derivata.

Eccezioni

key è null.

-oppure-

label è null.

-oppure-

context è null.

-oppure-

hashAlgorithm ha un oggetto Name che è null.

hashAlgorithm ha un oggetto Name vuoto.

derivedKeyLengthInBytes è negativo o maggiore del numero massimo di byte che è possibile derivare.

hashAlgorithm non è un algoritmo hash noto o supportato.

label o context contiene testo che non può essere convertito in UTF-8.

La piattaforma corrente non ha un'implementazione supportata di HMAC.

Commenti

label e context verranno convertiti in byte usando la codifica UTF-8. per altre codifiche, eseguire la conversione usando la codifica desiderata e usare un overload che accetta l'etichetta e il contesto come sequenza di byte.

Si applica a

DeriveBytes(ReadOnlySpan<Byte>, HashAlgorithmName, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32)

Origine:
SP800108HmacCounterKdf.cs
Origine:
SP800108HmacCounterKdf.cs

Deriva una chiave di una lunghezza specificata.

public:
 static cli::array <System::Byte> ^ DeriveBytes(ReadOnlySpan<System::Byte> key, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, ReadOnlySpan<System::Byte> label, ReadOnlySpan<System::Byte> context, int derivedKeyLengthInBytes);
public static byte[] DeriveBytes (ReadOnlySpan<byte> key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> label, ReadOnlySpan<byte> context, int derivedKeyLengthInBytes);
static member DeriveBytes : ReadOnlySpan<byte> * System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<byte> * ReadOnlySpan<byte> * int -> byte[]
Public Shared Function DeriveBytes (key As ReadOnlySpan(Of Byte), hashAlgorithm As HashAlgorithmName, label As ReadOnlySpan(Of Byte), context As ReadOnlySpan(Of Byte), derivedKeyLengthInBytes As Integer) As Byte()

Parametri

key
ReadOnlySpan<Byte>

Chiave di derivazione della chiave.

hashAlgorithm
HashAlgorithmName

Algoritmo HMAC.

label
ReadOnlySpan<Byte>

Etichetta che identifica lo scopo della chiave derivata.

context
ReadOnlySpan<Byte>

Contesto contenente informazioni correlate alla chiave derivata.

derivedKeyLengthInBytes
Int32

Lunghezza in byte della chiave derivata.

Restituisce

Byte[]

Matrice contenente la chiave derivata.

Eccezioni

hashAlgorithm ha un oggetto Name che è null.

hashAlgorithm ha un oggetto Name vuoto.

derivedKeyLengthInBytes è negativo o maggiore del numero massimo di byte che è possibile derivare.

hashAlgorithm non è un algoritmo hash noto o supportato.

La piattaforma corrente non ha un'implementazione supportata di HMAC.

Si applica a

DeriveBytes(ReadOnlySpan<Byte>, HashAlgorithmName, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>)

Origine:
SP800108HmacCounterKdf.cs
Origine:
SP800108HmacCounterKdf.cs

Riempie un buffer con una chiave derivata.

public:
 static void DeriveBytes(ReadOnlySpan<System::Byte> key, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, ReadOnlySpan<System::Byte> label, ReadOnlySpan<System::Byte> context, Span<System::Byte> destination);
public static void DeriveBytes (ReadOnlySpan<byte> key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> label, ReadOnlySpan<byte> context, Span<byte> destination);
static member DeriveBytes : ReadOnlySpan<byte> * System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<byte> * ReadOnlySpan<byte> * Span<byte> -> unit
Public Shared Sub DeriveBytes (key As ReadOnlySpan(Of Byte), hashAlgorithm As HashAlgorithmName, label As ReadOnlySpan(Of Byte), context As ReadOnlySpan(Of Byte), destination As Span(Of Byte))

Parametri

key
ReadOnlySpan<Byte>

Chiave di derivazione della chiave.

hashAlgorithm
HashAlgorithmName

Algoritmo HMAC.

label
ReadOnlySpan<Byte>

Etichetta che identifica lo scopo della chiave derivata.

context
ReadOnlySpan<Byte>

Contesto contenente informazioni correlate alla chiave derivata.

destination
Span<Byte>

Buffer che riceverà la chiave derivata.

Eccezioni

hashAlgorithm ha un oggetto Name che è null.

hashAlgorithm ha un oggetto Name vuoto.

destination è maggiore del numero massimo di byte che possono essere derivati.

hashAlgorithm non è un algoritmo hash noto o supportato.

La piattaforma corrente non ha un'implementazione supportata di HMAC.

Si applica a

DeriveBytes(ReadOnlySpan<Byte>, HashAlgorithmName, ReadOnlySpan<Char>, ReadOnlySpan<Char>, Int32)

Origine:
SP800108HmacCounterKdf.cs
Origine:
SP800108HmacCounterKdf.cs

Deriva una chiave di una lunghezza specificata.

public:
 static cli::array <System::Byte> ^ DeriveBytes(ReadOnlySpan<System::Byte> key, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, ReadOnlySpan<char> label, ReadOnlySpan<char> context, int derivedKeyLengthInBytes);
public static byte[] DeriveBytes (ReadOnlySpan<byte> key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, ReadOnlySpan<char> label, ReadOnlySpan<char> context, int derivedKeyLengthInBytes);
static member DeriveBytes : ReadOnlySpan<byte> * System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<char> * ReadOnlySpan<char> * int -> byte[]
Public Shared Function DeriveBytes (key As ReadOnlySpan(Of Byte), hashAlgorithm As HashAlgorithmName, label As ReadOnlySpan(Of Char), context As ReadOnlySpan(Of Char), derivedKeyLengthInBytes As Integer) As Byte()

Parametri

key
ReadOnlySpan<Byte>

Chiave di derivazione della chiave.

hashAlgorithm
HashAlgorithmName

Algoritmo HMAC.

label
ReadOnlySpan<Char>

Etichetta che identifica lo scopo della chiave derivata.

context
ReadOnlySpan<Char>

Contesto contenente informazioni correlate alla chiave derivata.

derivedKeyLengthInBytes
Int32

Lunghezza in byte della chiave derivata.

Restituisce

Byte[]

Matrice contenente la chiave derivata.

Eccezioni

hashAlgorithm ha un oggetto Name che è null.

hashAlgorithm ha un oggetto Name vuoto.

derivedKeyLengthInBytes è negativo o maggiore del numero massimo di byte che è possibile derivare.

hashAlgorithm non è un algoritmo hash noto o supportato.

label o context contiene testo che non può essere convertito in UTF-8.

La piattaforma corrente non ha un'implementazione supportata di HMAC.

Commenti

label e context verranno convertiti in byte usando la codifica UTF-8. per altre codifiche, eseguire la conversione usando la codifica desiderata e usare un overload che accetta l'etichetta e il contesto come sequenza di byte.

Si applica a

DeriveBytes(ReadOnlySpan<Byte>, HashAlgorithmName, ReadOnlySpan<Char>, ReadOnlySpan<Char>, Span<Byte>)

Origine:
SP800108HmacCounterKdf.cs
Origine:
SP800108HmacCounterKdf.cs

Riempie un buffer con una chiave derivata.

public:
 static void DeriveBytes(ReadOnlySpan<System::Byte> key, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, ReadOnlySpan<char> label, ReadOnlySpan<char> context, Span<System::Byte> destination);
public static void DeriveBytes (ReadOnlySpan<byte> key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, ReadOnlySpan<char> label, ReadOnlySpan<char> context, Span<byte> destination);
static member DeriveBytes : ReadOnlySpan<byte> * System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<char> * ReadOnlySpan<char> * Span<byte> -> unit
Public Shared Sub DeriveBytes (key As ReadOnlySpan(Of Byte), hashAlgorithm As HashAlgorithmName, label As ReadOnlySpan(Of Char), context As ReadOnlySpan(Of Char), destination As Span(Of Byte))

Parametri

key
ReadOnlySpan<Byte>

Chiave di derivazione della chiave.

hashAlgorithm
HashAlgorithmName

Algoritmo HMAC.

label
ReadOnlySpan<Char>

Etichetta che identifica lo scopo della chiave derivata.

context
ReadOnlySpan<Char>

Contesto contenente informazioni correlate alla chiave derivata.

destination
Span<Byte>

Buffer che riceverà la chiave derivata.

Eccezioni

hashAlgorithm ha un oggetto Name che è null.

hashAlgorithm ha un oggetto Name vuoto.

destination è maggiore del numero massimo di byte che possono essere derivati.

hashAlgorithm non è un algoritmo hash noto o supportato.

label o context contiene testo che non può essere convertito in UTF-8.

La piattaforma corrente non ha un'implementazione supportata di HMAC.

Commenti

label e context verrà convertito in byte usando la codifica UTF-8. per altre codifiche, eseguire la conversione usando la codifica desiderata e usare un overload che accetta l'etichetta e il contesto come sequenza di byte.

Si applica a