28 references to BCryptKeyHandle
Microsoft.AspNetCore.Cryptography.Internal (14)
LibraryImports.g.cs (8)
297internal static partial int BCryptDecrypt(global::Microsoft.AspNetCore.Cryptography.SafeHandles.BCryptKeyHandle hKey, byte* pbInput, uint cbInput, void* pPaddingInfo, byte* pbIV, uint cbIV, byte* pbOutput, uint cbOutput, out uint pcbResult, global::Microsoft.AspNetCore.Cryptography.Cng.BCryptEncryptFlags dwFlags) 303global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Cryptography.SafeHandles.BCryptKeyHandle>.ManagedToUnmanagedIn __hKey_native__marshaller = new(); 437internal static partial int BCryptEncrypt(global::Microsoft.AspNetCore.Cryptography.SafeHandles.BCryptKeyHandle hKey, byte* pbInput, uint cbInput, void* pPaddingInfo, byte* pbIV, uint cbIV, byte* pbOutput, uint cbOutput, out uint pcbResult, global::Microsoft.AspNetCore.Cryptography.Cng.BCryptEncryptFlags dwFlags) 443global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Cryptography.SafeHandles.BCryptKeyHandle>.ManagedToUnmanagedIn __hKey_native__marshaller = new(); 510internal 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) 518global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Cryptography.SafeHandles.BCryptKeyHandle>.ManagedToUnmanagedOut __phKey_native__marshaller = new(); 643internal static partial int BCryptKeyDerivation(global::Microsoft.AspNetCore.Cryptography.SafeHandles.BCryptKeyHandle hKey, global::Microsoft.AspNetCore.Cryptography.Cng.BCryptBufferDesc* pParameterList, byte* pbDerivedKey, uint cbDerivedKey, out uint pcbResult, uint dwFlags) 649global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Cryptography.SafeHandles.BCryptKeyHandle>.ManagedToUnmanagedIn __hKey_native__marshaller = new();
SafeHandles\BCryptAlgorithmHandle.cs (2)
52public BCryptKeyHandle GenerateSymmetricKey(byte* pbSecret, uint cbSecret) 54BCryptKeyHandle retVal;
UnsafeNativeMethods.cs (4)
67BCryptKeyHandle hKey, 144BCryptKeyHandle hKey, 177out BCryptKeyHandle phKey, 233BCryptKeyHandle hKey,
Microsoft.AspNetCore.Cryptography.KeyDerivation (4)
PBKDF2\Win8Pbkdf2Provider.cs (4)
32using (BCryptKeyHandle keyHandle = PasswordToPbkdfKeyHandle(password, CachedAlgorithmHandles.PBKDF2, prf)) 58private static BCryptKeyHandle PasswordToPbkdfKeyHandle(string password, BCryptAlgorithmHandle pbkdf2AlgHandle, KeyDerivationPrf prf) 98private static BCryptKeyHandle PasswordToPbkdfKeyHandleStep2(BCryptAlgorithmHandle pbkdf2AlgHandle, byte* pbPassword, uint cbPassword, KeyDerivationPrf prf) 155private static void DeriveKeyCore(BCryptKeyHandle pbkdf2KeyHandle, string hashAlgorithm, byte* pbSalt, uint cbSalt, ulong iterCount, byte* pbDerivedBytes, uint cbDerivedBytes)
Microsoft.AspNetCore.DataProtection (10)
Cng\CbcAuthenticatedEncryptor.cs (6)
110using (var symmetricKeyHandle = _symmetricAlgorithmHandle.GenerateSymmetricKey(pbSymmetricEncryptionSubkey, _symmetricAlgorithmSubkeyLengthInBytes)) 193using (var decryptionSubkeyHandle = _symmetricAlgorithmHandle.GenerateSymmetricKey(pbSymmetricEncryptionSubkey, _symmetricAlgorithmSubkeyLengthInBytes)) 214private byte[] DoCbcDecrypt(BCryptKeyHandle symmetricKeyHandle, byte* pbIV, byte* pbInput, uint cbInput) 278private void DoCbcEncrypt(BCryptKeyHandle symmetricKeyHandle, byte* pbIV, byte* pbInput, uint cbInput, byte* pbOutput, uint cbOutput) 334using (var symmetricKeyHandle = _symmetricAlgorithmHandle.GenerateSymmetricKey(pbSymmetricEncryptionSubkey, _symmetricAlgorithmSubkeyLengthInBytes)) 390private uint GetCbcEncryptedOutputSizeWithPadding(BCryptKeyHandle symmetricKeyHandle, byte* pbInput, uint cbInput)
Cng\CngGcmAuthenticatedEncryptor.cs (2)
153using (var decryptionSubkeyHandle = _symmetricAlgorithmHandle.GenerateSymmetricKey(pbSymmetricDecryptionSubkey, _symmetricAlgorithmSubkeyLengthInBytes)) 214using (var keyHandle = _symmetricAlgorithmHandle.GenerateSymmetricKey(pbKey, cbKey))
SP800_108\Win8SP800_108_CTR_HMACSHA512Provider.cs (2)
13private readonly BCryptKeyHandle _keyHandle; 73private static BCryptKeyHandle ImportKey(byte* pbKdk, uint cbKdk)