Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ DeriveKeyFromHmac() [2/2]

override byte[] System.Security.Cryptography.ECDiffieHellmanCng.DeriveKeyFromHmac ( ECDiffieHellmanPublicKey otherPartyPublicKey,
HashAlgorithmName hashAlgorithm,
byte?[] hmacKey,
byte?[] secretPrepend,
byte?[] secretAppend )
inlinevirtual

Reimplemented from System.Security.Cryptography.ECDiffieHellman.

Definition at line 443 of file ECDiffieHellmanCng.cs.

444 {
445 if (otherPartyPublicKey == null)
446 {
447 throw new ArgumentNullException("otherPartyPublicKey");
448 }
449 if (string.IsNullOrEmpty(hashAlgorithm.Name))
450 {
452 }
453 using SafeNCryptSecretHandle secretAgreement = DeriveSecretAgreementHandle(otherPartyPublicKey);
454 global::Interop.NCrypt.SecretAgreementFlags flags = ((hmacKey == null) ? global::Interop.NCrypt.SecretAgreementFlags.UseSecretAsHmacKey : global::Interop.NCrypt.SecretAgreementFlags.None);
455 return global::Interop.NCrypt.DeriveKeyMaterialHmac(secretAgreement, hashAlgorithm.Name, hmacKey, secretPrepend, secretAppend, flags);
456 }
static string Cryptography_HashAlgorithmNameNullOrEmpty
Definition SR.cs:60
Definition SR.cs:7
SafeNCryptSecretHandle DeriveSecretAgreementHandle(ECDiffieHellmanPublicKey otherPartyPublicKey)

References System.SR.Cryptography_HashAlgorithmNameNullOrEmpty, System.Security.Cryptography.ECDiffieHellmanCng.DeriveSecretAgreementHandle(), and System.Security.Cryptography.HashAlgorithmName.Name.