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

◆ GetSharedHandle() [2/2]

static Internal.NativeCrypto.SafeAlgorithmHandle Internal.Cryptography.AesBCryptModes.GetSharedHandle ( CipherMode cipherMode,
int feedback )
inlinestaticpackage

Definition at line 17 of file AesBCryptModes.cs.

18 {
19 switch (cipherMode)
20 {
21 case CipherMode.CFB:
22 switch (feedback)
23 {
24 case 16:
25 return s_hAlgCfb128.Value;
26 case 1:
27 return s_hAlgCfb8.Value;
28 }
29 break;
30 case CipherMode.CBC:
31 return s_hAlgCbc.Value;
32 case CipherMode.ECB:
33 return s_hAlgEcb.Value;
34 }
35 throw new NotSupportedException();
36 }
static readonly Lazy< SafeAlgorithmHandle > s_hAlgEcb
static readonly Lazy< SafeAlgorithmHandle > s_hAlgCbc
static readonly Lazy< SafeAlgorithmHandle > s_hAlgCfb8
static readonly Lazy< SafeAlgorithmHandle > s_hAlgCfb128

References Internal.Cryptography.AesBCryptModes.s_hAlgCbc, Internal.Cryptography.AesBCryptModes.s_hAlgCfb128, Internal.Cryptography.AesBCryptModes.s_hAlgCfb8, and Internal.Cryptography.AesBCryptModes.s_hAlgEcb.