Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ CheckMagicValueOfKey()

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

Definition at line 550 of file RSAImplementation.cs.

551 {
553 {
554 if (magic != global::Interop.BCrypt.KeyBlobMagicNumber.BCRYPT_RSAPRIVATE_MAGIC && magic != global::Interop.BCrypt.KeyBlobMagicNumber.BCRYPT_RSAFULLPRIVATE_MAGIC)
555 {
556 throw new CryptographicException(System.SR.Cryptography_NotValidPrivateKey);
557 }
558 }
559 else if (magic != global::Interop.BCrypt.KeyBlobMagicNumber.BCRYPT_RSAPUBLIC_MAGIC && magic != global::Interop.BCrypt.KeyBlobMagicNumber.BCRYPT_RSAPRIVATE_MAGIC && magic != global::Interop.BCrypt.KeyBlobMagicNumber.BCRYPT_RSAFULLPRIVATE_MAGIC)
560 {
561 throw new CryptographicException(System.SR.Cryptography_NotValidPublicOrPrivateKey);
562 }
563 }
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.RSAImplementation.RSACng.ExportParameters().