43 references to BCryptAlgorithmHandle
Microsoft.AspNetCore.Cryptography.Internal (43)
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)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LibraryImports.g.cs (8)
261
internal static partial int BCryptCreateHash(global::Microsoft.AspNetCore.Cryptography.SafeHandles.
BCryptAlgorithmHandle
hAlgorithm, out global::Microsoft.AspNetCore.Cryptography.SafeHandles.BCryptHashHandle phHash, nint pbHashObject, uint cbHashObject, byte* pbSecret, uint cbSecret, uint dwFlags)
272
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Cryptography.SafeHandles.
BCryptAlgorithmHandle
>.ManagedToUnmanagedIn __hAlgorithm_native__marshaller = new();
356
internal static partial int BCryptDeriveKeyPBKDF2(global::Microsoft.AspNetCore.Cryptography.SafeHandles.
BCryptAlgorithmHandle
hPrf, byte* pbPassword, uint cbPassword, byte* pbSalt, uint cbSalt, ulong cIterations, byte* pbDerivedKey, uint cbDerivedKey, uint dwFlags)
363
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Cryptography.SafeHandles.
BCryptAlgorithmHandle
>.ManagedToUnmanagedIn __hPrf_native__marshaller = new();
543
internal static partial int BCryptGenerateSymmetricKey(global::Microsoft.AspNetCore.Cryptography.SafeHandles.
BCryptAlgorithmHandle
hAlgorithm, out global::Microsoft.AspNetCore.Cryptography.SafeHandles.BCryptKeyHandle phKey, nint pbKeyObject, uint cbKeyObject, byte* pbSecret, uint cbSecret, uint dwFlags)
554
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Cryptography.SafeHandles.
BCryptAlgorithmHandle
>.ManagedToUnmanagedIn __hAlgorithm_native__marshaller = new();
726
internal static partial int BCryptOpenAlgorithmProvider(out global::Microsoft.AspNetCore.Cryptography.SafeHandles.
BCryptAlgorithmHandle
phAlgorithm, string pszAlgId, string pszImplementation, uint dwFlags)
735
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Cryptography.SafeHandles.
BCryptAlgorithmHandle
>.ManagedToUnmanagedOut __phAlgorithm_native__marshaller = new();
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,