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

◆ GetKey()

CngKey System.Security.Cryptography.ECDiffieHellmanCng.GetKey ( )
inlineprivate

Definition at line 381 of file ECDiffieHellmanCng.cs.

382 {
384 {
385 return _core.GetOrGenerateKey(null);
386 }
387 int num = 0;
388 num = KeySize;
389 CngAlgorithm algorithm = num switch
390 {
391 256 => CngAlgorithm.ECDiffieHellmanP256,
392 384 => CngAlgorithm.ECDiffieHellmanP384,
393 521 => CngAlgorithm.ECDiffieHellmanP521,
395 };
396 return _core.GetOrGenerateKey(num, algorithm);
397 }
static string Cryptography_InvalidKeySize
Definition SR.cs:92
Definition SR.cs:7
CngKey GetOrGenerateKey(int keySize, CngAlgorithm algorithm)

References System.Security.Cryptography.ECDiffieHellmanCng._core, System.SR.Cryptography_InvalidKeySize, System.Security.Cryptography.CngAlgorithm.ECDiffieHellmanP256, System.Security.Cryptography.CngAlgorithm.ECDiffieHellmanP384, System.Security.Cryptography.CngAlgorithm.ECDiffieHellmanP521, Internal.Cryptography.CngAlgorithmCore.GetOrGenerateKey(), Internal.Cryptography.CngAlgorithmCore.IsKeyGeneratedNamedCurve(), and System.Security.Cryptography.ECDiffieHellmanCng.KeySize.