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

◆ Key

virtual byte [] System.Security.Cryptography.SymmetricAlgorithm.Key
getset

Definition at line 89 of file SymmetricAlgorithm.cs.

90 {
91 get
92 {
93 if (KeyValue == null)
94 {
96 }
97 return KeyValue.CloneByteArray();
98 }
99 set
100 {
101 if (value == null)
102 {
103 throw new ArgumentNullException("value");
104 }
105 long num = (long)value.Length * 8L;
106 if (num > int.MaxValue || !ValidKeySize((int)num))
107 {
108 throw new CryptographicException(System.SR.Cryptography_InvalidKeySize);
109 }
110 KeySize = (int)num;
111 KeyValue = value.CloneByteArray();
112 }
113 }
static string Cryptography_InvalidKeySize
Definition SR.cs:92
Definition SR.cs:7

Referenced by Internal.Cryptography.AesImplementation.CreateDecryptor(), Internal.Cryptography.RC2Implementation.CreateDecryptor(), System.Security.Cryptography.SymmetricAlgorithm.CreateDecryptor(), Internal.Cryptography.AesImplementation.CreateEncryptor(), Internal.Cryptography.RC2Implementation.CreateEncryptor(), System.Security.Cryptography.SymmetricAlgorithm.CreateEncryptor(), Internal.Cryptography.AesImplementation.GenerateKey(), Internal.Cryptography.RC2Implementation.GenerateKey(), Internal.Cryptography.AesImplementation.TryDecryptCbcCore(), Internal.Cryptography.RC2Implementation.TryDecryptCbcCore(), Internal.Cryptography.AesImplementation.TryDecryptCfbCore(), Internal.Cryptography.AesImplementation.TryDecryptEcbCore(), Internal.Cryptography.RC2Implementation.TryDecryptEcbCore(), Internal.Cryptography.AesImplementation.TryEncryptCbcCore(), Internal.Cryptography.RC2Implementation.TryEncryptCbcCore(), Internal.Cryptography.AesImplementation.TryEncryptCfbCore(), Internal.Cryptography.AesImplementation.TryEncryptEcbCore(), and Internal.Cryptography.RC2Implementation.TryEncryptEcbCore().