ECDiffieHellmanOpenSsl.DeriveKeyFromHmac Metodo

Definizione

Esegue la derivazione della chiave usando un algoritmo HMAC (Hash-based Message Authentication Code) specificato con dati facoltativi anteposti 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);
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 del valore HMAC.

secretPrepend
Byte[]

Valore da anteporre al segreto derivato prima dell'hashing.

secretAppend
Byte[]

Valore da aggiungere al segreto derivato prima dell'hashing.

Restituisce

Byte[]

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

Eccezioni

La curva usata da otherPartyPublicKey ha dimensioni diverse rispetto alla curva da questa chiave.

-oppure-

Il parametro hashAlgorithm non specifica un hash.

otherPartyPublicKey è null.

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

-oppure-

Questa istanza rappresenta solo una chiave pubblica.

Si applica a