35 references to BCryptAlgorithmHandle
Microsoft.AspNetCore.Cryptography.Internal (35)
Cng\CachedAlgorithmHandles.cs (25)
26
public static
BCryptAlgorithmHandle
AES_CBC => CachedAlgorithmInfo.GetAlgorithmHandle(ref _aesCbc);
28
public static
BCryptAlgorithmHandle
AES_GCM => CachedAlgorithmInfo.GetAlgorithmHandle(ref _aesGcm);
30
public static
BCryptAlgorithmHandle
HMAC_SHA1 => CachedAlgorithmInfo.GetAlgorithmHandle(ref _hmacSha1);
32
public static
BCryptAlgorithmHandle
HMAC_SHA256 => CachedAlgorithmInfo.GetAlgorithmHandle(ref _hmacSha256);
34
public static
BCryptAlgorithmHandle
HMAC_SHA512 => CachedAlgorithmInfo.GetAlgorithmHandle(ref _hmacSha512);
37
public static
BCryptAlgorithmHandle
PBKDF2 => CachedAlgorithmInfo.GetAlgorithmHandle(ref _pbkdf2);
39
public static
BCryptAlgorithmHandle
SHA1 => CachedAlgorithmInfo.GetAlgorithmHandle(ref _sha1);
41
public static
BCryptAlgorithmHandle
SHA256 => CachedAlgorithmInfo.GetAlgorithmHandle(ref _sha256);
43
public static
BCryptAlgorithmHandle
SHA512 => CachedAlgorithmInfo.GetAlgorithmHandle(ref _sha512);
46
public static
BCryptAlgorithmHandle
SP800_108_CTR_HMAC => CachedAlgorithmInfo.GetAlgorithmHandle(ref _sp800_108_ctr_hmac);
48
private static
BCryptAlgorithmHandle
GetAesAlgorithm(string chainingMode)
50
var
algHandle =
BCryptAlgorithmHandle
.OpenAlgorithmHandle(Constants.BCRYPT_AES_ALGORITHM);
55
private static
BCryptAlgorithmHandle
GetHashAlgorithm(string algorithm)
57
return
BCryptAlgorithmHandle
.OpenAlgorithmHandle(algorithm, hmac: false);
60
private static
BCryptAlgorithmHandle
GetHmacAlgorithm(string algorithm)
62
return
BCryptAlgorithmHandle
.OpenAlgorithmHandle(algorithm, hmac: true);
65
private static
BCryptAlgorithmHandle
GetPbkdf2Algorithm()
67
return
BCryptAlgorithmHandle
.OpenAlgorithmHandle(Constants.BCRYPT_PBKDF2_ALGORITHM, implementation: Constants.MS_PRIMITIVE_PROVIDER);
70
private static
BCryptAlgorithmHandle
GetSP800_108_CTR_HMACAlgorithm()
72
return
BCryptAlgorithmHandle
.OpenAlgorithmHandle(Constants.BCRYPT_SP800108_CTR_HMAC_ALGORITHM, implementation: Constants.MS_PRIMITIVE_PROVIDER);
78
private WeakReference<
BCryptAlgorithmHandle
>? _algorithmHandle;
79
private readonly Func<
BCryptAlgorithmHandle
> _factory;
81
public CachedAlgorithmInfo(Func<
BCryptAlgorithmHandle
> factory)
87
public static
BCryptAlgorithmHandle
GetAlgorithmHandle(ref CachedAlgorithmInfo cachedAlgorithmInfo)
SafeHandles\BCryptAlgorithmHandle.cs (2)
130
public static
BCryptAlgorithmHandle
OpenAlgorithmHandle(string algorithmId, string? implementation = null, bool hmac = false)
138
BCryptAlgorithmHandle
algHandle;
SafeHandles\BCryptHashHandle.cs (2)
10
private
BCryptAlgorithmHandle
? _algProviderHandle;
65
internal void SetAlgorithmProviderHandle(
BCryptAlgorithmHandle
algProviderHandle)
SafeHandles\BCryptKeyHandle.cs (2)
8
private
BCryptAlgorithmHandle
? _algProviderHandle;
26
internal void SetAlgorithmProviderHandle(
BCryptAlgorithmHandle
algProviderHandle)
UnsafeNativeMethods.cs (4)
51
BCryptAlgorithmHandle
hAlgorithm,
86
BCryptAlgorithmHandle
hPrf,
176
BCryptAlgorithmHandle
hAlgorithm,
248
out
BCryptAlgorithmHandle
phAlgorithm,