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

◆ EffectiveKeySize

virtual int System.Security.Cryptography.RC2.EffectiveKeySize
getset

Definition at line 40 of file RC2.cs.

41 {
42 get
43 {
44 if (EffectiveKeySizeValue == 0)
45 {
46 return KeySizeValue;
47 }
49 }
50 set
51 {
52 if (value > KeySizeValue)
53 {
54 throw new CryptographicException(System.SR.Cryptography_RC2_EKSKS);
55 }
56 if (value == 0)
57 {
59 return;
60 }
61 if (value < 40)
62 {
63 throw new CryptographicException(System.SR.Cryptography_RC2_EKS40);
64 }
65 if (value.IsLegalSize(s_legalKeySizes))
66 {
68 return;
69 }
70 throw new CryptographicException(System.SR.Cryptography_InvalidKeySize);
71 }
72 }
static string Cryptography_RC2_EKSKS
Definition SR.cs:132
static string Cryptography_InvalidKeySize
Definition SR.cs:92
static string Cryptography_RC2_EKS40
Definition SR.cs:130
Definition SR.cs:7
static readonly KeySizes[] s_legalKeySizes
Definition RC2.cs:19