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

◆ IsWeakKey()

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

Definition at line 77 of file DES.cs.

78 {
79 if (!IsLegalKeySize(rgbKey))
80 {
81 throw new CryptographicException(System.SR.Cryptography_InvalidKeySize);
82 }
83 byte[] array = rgbKey.FixupKeyParity();
85 if (num == 72340172838076673L || num == 18374403900871474942uL || num == 2242545357694045710L || num == 16204198716015505905uL)
86 {
87 return true;
88 }
89 return false;
90 }
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().