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

◆ IsSemiWeakKey()

static bool System.Security.Cryptography.DES.IsSemiWeakKey ( byte[] rgbKey)
inlinestaticinherited

Definition at line 92 of file DES.cs.

93 {
94 if (!IsLegalKeySize(rgbKey))
95 {
96 throw new CryptographicException(System.SR.Cryptography_InvalidKeySize);
97 }
98 byte[] array = rgbKey.FixupKeyParity();
100 if (num == 143554428589179390L || num == 18303189645120372225uL || num == 2296870857142767345L || num == 16149873216566784270uL || num == 135110050437988849L || num == 16141428838415593729uL || num == 2305315235293957886L || num == 18311634023271562766uL || num == 80784550989267214L || num == 2234100979542855169L || num == 16212643094166696446uL || num == 18365959522720284401uL)
101 {
102 return true;
103 }
104 return false;
105 }
static ulong ReadUInt64BigEndian(ReadOnlySpan< byte > source)
static string Cryptography_InvalidKeySize
Definition SR.cs:92
Definition SR.cs:7
static bool IsLegalKeySize(byte[] rgbKey)
Definition DES.cs:107

References System.array, System.SR.Cryptography_InvalidKeySize, System.Security.Cryptography.DES.IsLegalKeySize(), System.L, and System.Buffers.Binary.BinaryPrimitives.ReadUInt64BigEndian().

Referenced by Internal.Cryptography.DesImplementation.CreateTransform(), System.Security.Cryptography.DESCryptoServiceProvider.CreateTransform(), Internal.Cryptography.DesImplementation.GenerateKey(), and System.Security.Cryptography.DESCryptoServiceProvider.GenerateKey().