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

◆ CheckMagicValueOfKey() [2/2]

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

Definition at line 255 of file ECCng.cs.

256 {
257 if (includePrivateParameters)
258 {
259 if (!IsMagicValueOfKeyPrivate(magic))
260 {
261 throw new CryptographicException(System.SR.Cryptography_NotValidPrivateKey);
262 }
263 }
264 else if (!IsMagicValueOfKeyPublic(magic))
265 {
266 throw new CryptographicException(System.SR.Cryptography_NotValidPublicOrPrivateKey);
267 }
268 }
static string Cryptography_NotValidPrivateKey
Definition SR.cs:120
static string Cryptography_NotValidPublicOrPrivateKey
Definition SR.cs:122
Definition SR.cs:7
static bool IsMagicValueOfKeyPrivate(global::Interop.BCrypt.KeyBlobMagicNumber magic)
Definition ECCng.cs:239
static bool IsMagicValueOfKeyPublic(global::Interop.BCrypt.KeyBlobMagicNumber magic)
Definition ECCng.cs:257

References System.SR.Cryptography_NotValidPrivateKey, System.SR.Cryptography_NotValidPublicOrPrivateKey, System.Security.Cryptography.ECCng.IsMagicValueOfKeyPrivate(), and System.Security.Cryptography.ECCng.IsMagicValueOfKeyPublic().