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

◆ CheckMagicValueOfKey()

static void System.Security.Cryptography.DSACng.CheckMagicValueOfKey ( global::Interop::BCrypt::KeyBlobMagicNumber magic,
bool includePrivateParameters )
inlinestaticprivate

Definition at line 370 of file DSACng.cs.

371 {
372 if (includePrivateParameters)
373 {
374 if (magic != global::Interop.BCrypt.KeyBlobMagicNumber.BCRYPT_DSA_PRIVATE_MAGIC && magic != global::Interop.BCrypt.KeyBlobMagicNumber.BCRYPT_DSA_PRIVATE_MAGIC_V2)
375 {
376 throw new CryptographicException(System.SR.Cryptography_NotValidPrivateKey);
377 }
378 }
379 else if (magic != global::Interop.BCrypt.KeyBlobMagicNumber.BCRYPT_DSA_PUBLIC_MAGIC && magic != global::Interop.BCrypt.KeyBlobMagicNumber.BCRYPT_DSA_PUBLIC_MAGIC_V2)
380 {
381 throw new CryptographicException(System.SR.Cryptography_NotValidPublicOrPrivateKey);
382 }
383 }
static string Cryptography_NotValidPrivateKey
Definition SR.cs:120
static string Cryptography_NotValidPublicOrPrivateKey
Definition SR.cs:122
Definition SR.cs:7

References System.SR.Cryptography_NotValidPrivateKey, and System.SR.Cryptography_NotValidPublicOrPrivateKey.

Referenced by System.Security.Cryptography.DSACng.ExportParameters().