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

◆ Key

override byte [] System.Security.Cryptography.TripleDES.Key
getset

Definition at line 20 of file TripleDES.cs.

21 {
22 get
23 {
24 byte[] key = base.Key;
25 while (IsWeakKey(key))
26 {
28 key = base.Key;
29 }
30 return key;
31 }
32 set
33 {
34 if (value == null)
35 {
36 throw new ArgumentNullException("value");
37 }
38 if (!(value.Length * 8).IsLegalSize(s_legalKeySizes))
39 {
41 }
42 if (IsWeakKey(value))
43 {
44 throw new CryptographicException(System.SR.Format(System.SR.Cryptography_InvalidKey_Weak, "TripleDES"));
45 }
46 base.Key = value;
47 }
48 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Cryptography_InvalidKey_Weak
Definition SR.cs:96
static string Cryptography_InvalidKeySize
Definition SR.cs:92
Definition SR.cs:7
static bool IsWeakKey(byte[] rgbKey)
Definition TripleDES.cs:70
static readonly KeySizes[] s_legalKeySizes
Definition TripleDES.cs:15

Referenced by Internal.Cryptography.TripleDesImplementation.CreateDecryptor(), Internal.Cryptography.TripleDesImplementation.CreateEncryptor(), Internal.Cryptography.TripleDesImplementation.GenerateKey(), Internal.Cryptography.TripleDesImplementation.TryDecryptCbcCore(), Internal.Cryptography.TripleDesImplementation.TryDecryptCfbCore(), Internal.Cryptography.TripleDesImplementation.TryDecryptEcbCore(), Internal.Cryptography.TripleDesImplementation.TryEncryptCbcCore(), Internal.Cryptography.TripleDesImplementation.TryEncryptCfbCore(), and Internal.Cryptography.TripleDesImplementation.TryEncryptEcbCore().