ECDiffieHellmanOpenSsl.DeriveKeyFromHmac Metodo

Definizione

Esegue la derivazione della chiave usando un algoritmo HMAC (Hash-based Message Authentication Code) specificato con dati facoltativi anteponiti o accodati.

public:
 override cli::array <System::Byte> ^ DeriveKeyFromHmac(System::Security::Cryptography::ECDiffieHellmanPublicKey ^ otherPartyPublicKey, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, cli::array <System::Byte> ^ hmacKey, cli::array <System::Byte> ^ secretPrepend, cli::array <System::Byte> ^ secretAppend);
public override byte[] DeriveKeyFromHmac(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[]? hmacKey, byte[]? secretPrepend, byte[]? secretAppend);
override this.DeriveKeyFromHmac : System.Security.Cryptography.ECDiffieHellmanPublicKey * System.Security.Cryptography.HashAlgorithmName * byte[] * byte[] * byte[] -> byte[]
Public Overrides Function DeriveKeyFromHmac (otherPartyPublicKey As ECDiffieHellmanPublicKey, hashAlgorithm As HashAlgorithmName, hmacKey As Byte(), secretPrepend As Byte(), secretAppend As Byte()) As Byte()

Parametri

otherPartyPublicKey
ECDiffieHellmanPublicKey

Chiave pubblica dell'altra parte.

hashAlgorithm
HashAlgorithmName

Algoritmo hash da usare per derivare il materiale della chiave.

hmacKey
Byte[]

Chiave per HMAC.

secretPrepend
Byte[]

Valore da anteporre al segreto derivato prima dell'hashing.

secretAppend
Byte[]

Valore da aggiungere al segreto derivato prima dell'hashing.

Valori restituiti

Byte[]

HMAC del segreto condiviso dopo aver pre sospeso o accodato i dati come richiesto.

Eccezioni

La curva usata da otherPartyPublicKey ha una dimensione diversa rispetto alla curva di questa chiave.

oppure

Il hashAlgorithm parametro non specifica un hash.

otherPartyPublicKey è null.

La curva usata da otherPartyPublicKey è diversa dalla curva di questa chiave.

oppure

Questa istanza rappresenta solo una chiave pubblica.

Si applica a