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

◆ DeriveKeyMaterial() [2/2]

override byte[] System.Security.Cryptography.ECDiffieHellmanCng.DeriveKeyMaterial ( ECDiffieHellmanPublicKey otherPartyPublicKey)
inlinevirtual

Reimplemented from System.Security.Cryptography.ECDiffieHellman.

Definition at line 239 of file ECDiffieHellmanCng.cs.

240 {
241 if (otherPartyPublicKey == null)
242 {
243 throw new ArgumentNullException("otherPartyPublicKey");
244 }
245 if (otherPartyPublicKey is ECDiffieHellmanCngPublicKey eCDiffieHellmanCngPublicKey)
246 {
247 using CngKey otherPartyPublicKey2 = eCDiffieHellmanCngPublicKey.Import();
248 return DeriveKeyMaterial(otherPartyPublicKey2);
249 }
250 ECParameters parameters = otherPartyPublicKey.ExportParameters();
251 using ECDiffieHellmanCng eCDiffieHellmanCng = new ECDiffieHellmanCng();
252 eCDiffieHellmanCng.ImportParameters(parameters);
253 ECDiffieHellmanCngPublicKey eCDiffieHellmanCngPublicKey2;
254 using (eCDiffieHellmanCngPublicKey2 = (ECDiffieHellmanCngPublicKey)eCDiffieHellmanCng.PublicKey)
255 {
256 using CngKey otherPartyPublicKey3 = eCDiffieHellmanCngPublicKey2.Import();
257 return DeriveKeyMaterial(otherPartyPublicKey3);
258 }
259 }
override byte[] DeriveKeyMaterial(ECDiffieHellmanPublicKey otherPartyPublicKey)

References System.Security.Cryptography.ECDiffieHellmanCng.ECDiffieHellmanCng(), System.Security.Cryptography.ECDiffieHellmanCng.DeriveKeyMaterial(), System.Security.Cryptography.ECDiffieHellmanPublicKey.ExportParameters(), System.Security.Cryptography.ECDiffieHellmanCngPublicKey.Import(), and System.Security.Cryptography.CngKey.Import().

Referenced by System.Security.Cryptography.ECDiffieHellmanCng.DeriveKeyMaterial().