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

◆ DeriveKeyFromHash() [2/2]

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

Reimplemented from System.Security.Cryptography.ECDiffieHellman.

Definition at line 429 of file ECDiffieHellmanCng.cs.

430 {
431 if (otherPartyPublicKey == null)
432 {
433 throw new ArgumentNullException("otherPartyPublicKey");
434 }
435 if (string.IsNullOrEmpty(hashAlgorithm.Name))
436 {
438 }
439 using SafeNCryptSecretHandle secretAgreement = DeriveSecretAgreementHandle(otherPartyPublicKey);
440 return global::Interop.NCrypt.DeriveKeyMaterialHash(secretAgreement, hashAlgorithm.Name, secretPrepend, secretAppend, global::Interop.NCrypt.SecretAgreementFlags.None);
441 }
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.