27 if (safeAlgorithmHandle !=
null)
29 return safeAlgorithmHandle;
32 if (chainingMode !=
null)
34 safeAlgorithmHandle2.SetCipherMode(chainingMode);
37 if (safeAlgorithmHandle !=
null)
40 return safeAlgorithmHandle;
42 return safeAlgorithmHandle2;
static SafeAlgorithmHandle s_aesCcm
static SafeAlgorithmHandle s_chaCha20Poly1305
static SafeAlgorithmHandle GetCachedAlgorithmHandle(ref SafeAlgorithmHandle handle, string algId, string chainingMode=null)
static SafeAlgorithmHandle s_aesGcm
static bool IsChaCha20Poly1305Supported
static SafeAlgorithmHandle AesGcm
static SafeAlgorithmHandle AesCcm
static SafeAlgorithmHandle ChaCha20Poly1305
static SafeAlgorithmHandle BCryptOpenAlgorithmProvider(string pszAlgId, string pszImplementation, OpenAlgorithmProviderFlags dwFlags)
OpenAlgorithmProviderFlags
static bool IsWindowsVersionAtLeast(int major, int minor=0, int build=0, int revision=0)
static int CompareExchange(ref int location1, int value, int comparand)
static bool Read(ref bool location)