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

◆ CheckMagicValueOfKey()

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

Definition at line 551 of file RSACng.cs.

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