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

◆ DeriveKeyFromHmac() [1/3]

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

Definition at line 192 of file ECDiffieHellmanImplementation.cs.

193 {
194 if (otherPartyPublicKey == null)
195 {
196 throw new ArgumentNullException("otherPartyPublicKey");
197 }
198 if (string.IsNullOrEmpty(hashAlgorithm.Name))
199 {
201 }
202 using SafeNCryptSecretHandle secretAgreement = DeriveSecretAgreementHandle(otherPartyPublicKey);
203 global::Interop.NCrypt.SecretAgreementFlags flags = ((hmacKey == null) ? global::Interop.NCrypt.SecretAgreementFlags.UseSecretAsHmacKey : global::Interop.NCrypt.SecretAgreementFlags.None);
204 return global::Interop.NCrypt.DeriveKeyMaterialHmac(secretAgreement, hashAlgorithm.Name, hmacKey, secretPrepend, secretAppend, flags);
205 }
static string Cryptography_HashAlgorithmNameNullOrEmpty
Definition SR.cs:60
Definition SR.cs:7
SafeNCryptSecretHandle DeriveSecretAgreementHandle(ECDiffieHellmanPublicKey otherPartyPublicKey)

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