2 instantiations of SafeNCryptKeyHandle
System.Security.Cryptography (1)
System\Security\Cryptography\X509Certificates\CertificateHelpers.Windows.cs (1)
20new SafeNCryptKeyHandle(handle, parentHandle);
System.Security.Cryptography.Pkcs (1)
Internal\Cryptography\Pal\Windows\PkcsPalWindows.cs (1)
134using (SafeNCryptKeyHandle keyHandle = new SafeNCryptKeyHandle(handle.DangerousGetHandle(), handle))
137 references to SafeNCryptKeyHandle
System.Core (1)
System.Core.cs (1)
7[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle))]
System.Security.Cryptography (134)
_generated\0\LibraryImports.g.cs (42)
3807internal static unsafe partial bool CertSetCertificateContextProperty(global::Microsoft.Win32.SafeHandles.SafeCertContextHandle pCertContext, global::Interop.Crypt32.CertContextPropId dwPropId, global::Interop.Crypt32.CertSetPropertyFlags dwFlags, global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle keyHandle) 3815global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>.ManagedToUnmanagedIn __keyHandle_native__marshaller = new(); 3854internal static unsafe partial bool CertSetCertificateContextProperty(nint pCertContext, global::Interop.Crypt32.CertContextPropId dwPropId, global::Interop.Crypt32.CertSetPropertyFlags dwFlags, global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle keyHandle) 3861global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>.ManagedToUnmanagedIn __keyHandle_native__marshaller = new(); 3951public static partial bool CryptAcquireCertificatePrivateKey(global::Microsoft.Win32.SafeHandles.SafeCertContextHandle pCert, global::Interop.Crypt32.CryptAcquireCertificatePrivateKeyFlags dwFlags, nint pvParameters, out global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle phCryptProvOrNCryptKey, out global::Interop.Crypt32.CryptKeySpec pdwKeySpec, out bool pfCallerFreeProvOrNCryptKey) 3964global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>.ManagedToUnmanagedOut __phCryptProvOrNCryptKey_native__marshaller = new(); 4885internal static unsafe partial global::Interop.NCrypt.ErrorCode NCryptEncrypt(global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle hKey, global::System.ReadOnlySpan<byte> pbInput, int cbInput, void* pPaddingInfo, global::System.Span<byte> pbOutput, int cbOutput, out int pcbResult, global::Interop.NCrypt.AsymmetricPaddingMode dwFlags) 4891global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>.ManagedToUnmanagedIn __hKey_native__marshaller = new(); 4924internal static unsafe partial global::Interop.NCrypt.ErrorCode NCryptDecrypt(global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle hKey, global::System.ReadOnlySpan<byte> pbInput, int cbInput, void* pPaddingInfo, global::System.Span<byte> pbOutput, int cbOutput, out int pcbResult, global::Interop.NCrypt.AsymmetricPaddingMode dwFlags) 4930global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>.ManagedToUnmanagedIn __hKey_native__marshaller = new(); 4963internal static partial global::Interop.NCrypt.ErrorCode NCryptOpenKey(global::Microsoft.Win32.SafeHandles.SafeNCryptProviderHandle hProvider, out global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle phKey, string pszKeyName, int dwLegacyKeySpec, global::System.Security.Cryptography.CngKeyOpenOptions dwFlags) 4971global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>.ManagedToUnmanagedOut __phKey_native__marshaller = new(); 5015internal static partial global::Interop.NCrypt.ErrorCode NCryptImportKey(global::Microsoft.Win32.SafeHandles.SafeNCryptProviderHandle hProvider, nint hImportKey, string pszBlobType, nint pParameterList, out global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle phKey, ref byte pbData, int cbData, int dwFlags) 5023global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>.ManagedToUnmanagedOut __phKey_native__marshaller = new(); 5068internal static partial global::Interop.NCrypt.ErrorCode NCryptImportKey(global::Microsoft.Win32.SafeHandles.SafeNCryptProviderHandle hProvider, nint hImportKey, string pszBlobType, ref global::Interop.NCrypt.NCryptBufferDesc pParameterList, out global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle phKey, ref byte pbData, int cbData, int dwFlags) 5076global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>.ManagedToUnmanagedOut __phKey_native__marshaller = new(); 5122internal static partial global::Interop.NCrypt.ErrorCode NCryptExportKey(global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle hKey, nint hExportKey, string pszBlobType, nint pParameterList, byte[] pbOutput, int cbOutput, out int pcbResult, int dwFlags) 5128global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>.ManagedToUnmanagedIn __hKey_native__marshaller = new(); 5161internal static partial global::Interop.NCrypt.ErrorCode NCryptExportKey(global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle hKey, nint hExportKey, string pszBlobType, nint pParameterList, ref byte pbOutput, int cbOutput, out int pcbResult, int dwFlags) 5167global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>.ManagedToUnmanagedIn __hKey_native__marshaller = new(); 5200internal static partial global::Interop.NCrypt.ErrorCode NCryptExportKey(global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle hKey, nint hExportKey, string pszBlobType, nint pParameterList, global::System.Span<byte> pbOutput, int cbOutput, out int pcbResult, int dwFlags) 5206global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>.ManagedToUnmanagedIn __hKey_native__marshaller = new(); 5239internal static partial global::Interop.NCrypt.ErrorCode NCryptExportKey(global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle hKey, nint hExportKey, string pszBlobType, ref global::Interop.NCrypt.NCryptBufferDesc pParameterList, ref byte pbOutput, int cbOutput, out int pcbResult, int dwFlags) 5245global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>.ManagedToUnmanagedIn __hKey_native__marshaller = new(); 5279internal static partial global::Interop.NCrypt.ErrorCode NCryptDeleteKey(global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle hKey, int dwFlags) 5284global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>.ManagedToUnmanagedIn __hKey_native__marshaller = new(); 5313internal static partial global::Interop.NCrypt.ErrorCode NCryptCreatePersistedKey(global::Microsoft.Win32.SafeHandles.SafeNCryptProviderHandle hProvider, out global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle phKey, string pszAlgId, string pszKeyName, int dwLegacyKeySpec, global::System.Security.Cryptography.CngKeyCreationOptions dwFlags) 5321global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>.ManagedToUnmanagedOut __phKey_native__marshaller = new(); 5366internal static partial global::Interop.NCrypt.ErrorCode NCryptFinalizeKey(global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle hKey, int dwFlags) 5371global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>.ManagedToUnmanagedIn __hKey_native__marshaller = new(); 5400private static unsafe partial global::Interop.NCrypt.ErrorCode NCryptDecapsulate(global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle hKey, byte* pbCipherText, uint cbCipherText, byte* pbSecretKey, uint cbSecretKey, out uint pcbSecretKey, uint dwFlags) 5406global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>.ManagedToUnmanagedIn __hKey_native__marshaller = new(); 5437private static unsafe partial global::Interop.NCrypt.ErrorCode NCryptEncapsulate(global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle hKey, byte* pbSecretKey, uint cbSecretKey, out uint pcbSecretKey, byte* pbCipherText, uint cbCipherText, out uint pcbCipherText, uint dwFlags) 5444global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>.ManagedToUnmanagedIn __hKey_native__marshaller = new(); 5555private static partial global::Interop.NCrypt.ErrorCode NCryptSecretAgreement(global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle hPrivKey, global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle hPubKey, out global::Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle phSecret, int dwFlags) 5565global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>.ManagedToUnmanagedIn __hPubKey_native__marshaller = new(); 5566global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>.ManagedToUnmanagedIn __hPrivKey_native__marshaller = new(); 5735private static unsafe partial global::Interop.NCrypt.ErrorCode NCryptSignHash(global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle hKey, void* pPaddingInfo, byte* pbHashValue, int cbHashValue, byte* pbSignature, int cbSignature, out int pcbResult, global::Interop.NCrypt.AsymmetricPaddingMode dwFlags) 5741global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>.ManagedToUnmanagedIn __hKey_native__marshaller = new(); 5772private static unsafe partial global::Interop.NCrypt.ErrorCode NCryptVerifySignature(global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle hKey, void* pPaddingInfo, byte* pbHashValue, int cbHashValue, byte* pbSignature, int cbSignature, global::Interop.NCrypt.AsymmetricPaddingMode dwFlags) 5777global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle>.ManagedToUnmanagedIn __hKey_native__marshaller = new();
Microsoft\Win32\SafeHandles\NCryptSafeHandles.cs (2)
362internal SafeNCryptKeyHandle Duplicate() 364return Duplicate<SafeNCryptKeyHandle>();
src\runtime\src\libraries\Common\src\Interop\Windows\Crypt32\Interop.CertSetCertificateContextProperty_SafeNCryptKeyHandle.cs (2)
13internal static unsafe partial bool CertSetCertificateContextProperty(SafeCertContextHandle pCertContext, CertContextPropId dwPropId, CertSetPropertyFlags dwFlags, SafeNCryptKeyHandle keyHandle); 17internal static unsafe partial bool CertSetCertificateContextProperty(nint pCertContext, CertContextPropId dwPropId, CertSetPropertyFlags dwFlags, SafeNCryptKeyHandle keyHandle);
src\runtime\src\libraries\Common\src\Interop\Windows\Crypt32\Interop.CryptAcquireCertificatePrivateKey_SafeNCryptKeyHandle.cs (1)
18out SafeNCryptKeyHandle phCryptProvOrNCryptKey,
src\runtime\src\libraries\Common\src\Interop\Windows\NCrypt\Interop.EncryptDecrypt.cs (2)
13internal static unsafe partial ErrorCode NCryptEncrypt(SafeNCryptKeyHandle hKey, ReadOnlySpan<byte> pbInput, int cbInput, void* pPaddingInfo, Span<byte> pbOutput, int cbOutput, out int pcbResult, AsymmetricPaddingMode dwFlags); 16internal static unsafe partial ErrorCode NCryptDecrypt(SafeNCryptKeyHandle hKey, ReadOnlySpan<byte> pbInput, int cbInput, void* pPaddingInfo, Span<byte> pbOutput, int cbOutput, out int pcbResult, AsymmetricPaddingMode dwFlags);
src\runtime\src\libraries\Common\src\Interop\Windows\NCrypt\Interop.Keys.cs (10)
20internal static partial ErrorCode NCryptOpenKey(SafeNCryptProviderHandle hProvider, out SafeNCryptKeyHandle phKey, string pszKeyName, int dwLegacyKeySpec, CngKeyOpenOptions dwFlags); 23internal static partial ErrorCode NCryptImportKey(SafeNCryptProviderHandle hProvider, IntPtr hImportKey, string pszBlobType, IntPtr pParameterList, out SafeNCryptKeyHandle phKey, ref byte pbData, int cbData, int dwFlags); 26internal static partial ErrorCode NCryptImportKey(SafeNCryptProviderHandle hProvider, IntPtr hImportKey, string pszBlobType, ref NCryptBufferDesc pParameterList, out SafeNCryptKeyHandle phKey, ref byte pbData, int cbData, int dwFlags); 29internal static partial ErrorCode NCryptExportKey(SafeNCryptKeyHandle hKey, IntPtr hExportKey, string pszBlobType, IntPtr pParameterList, byte[]? pbOutput, int cbOutput, out int pcbResult, int dwFlags); 32internal static partial ErrorCode NCryptExportKey(SafeNCryptKeyHandle hKey, IntPtr hExportKey, string pszBlobType, IntPtr pParameterList, ref byte pbOutput, int cbOutput, out int pcbResult, int dwFlags); 35internal static partial ErrorCode NCryptExportKey(SafeNCryptKeyHandle hKey, IntPtr hExportKey, string pszBlobType, IntPtr pParameterList, Span<byte> pbOutput, int cbOutput, out int pcbResult, int dwFlags); 38internal static partial ErrorCode NCryptExportKey(SafeNCryptKeyHandle hKey, IntPtr hExportKey, string pszBlobType, ref NCryptBufferDesc pParameterList, ref byte pbOutput, int cbOutput, out int pcbResult, int dwFlags); 41internal static partial ErrorCode NCryptDeleteKey(SafeNCryptKeyHandle hKey, int dwFlags); 44internal static partial ErrorCode NCryptCreatePersistedKey(SafeNCryptProviderHandle hProvider, out SafeNCryptKeyHandle phKey, string pszAlgId, string? pszKeyName, int dwLegacyKeySpec, CngKeyCreationOptions dwFlags); 47internal static partial ErrorCode NCryptFinalizeKey(SafeNCryptKeyHandle hKey, int dwFlags);
src\runtime\src\libraries\Common\src\Interop\Windows\NCrypt\Interop.NCryptDecapsulateEncapsulate.cs (4)
15SafeNCryptKeyHandle hKey, 25SafeNCryptKeyHandle hKey, 35SafeNCryptKeyHandle hKey, 62SafeNCryptKeyHandle hKey,
src\runtime\src\libraries\Common\src\Interop\Windows\NCrypt\Interop.NCryptDeriveSecretAgreement.cs (4)
26SafeNCryptKeyHandle hPrivKey, 27SafeNCryptKeyHandle hPubKey, 36SafeNCryptKeyHandle privateKey, 37SafeNCryptKeyHandle otherPartyPublicKey)
src\runtime\src\libraries\Common\src\Interop\Windows\NCrypt\Interop.SignVerify.cs (4)
14private static unsafe partial ErrorCode NCryptSignHash(SafeNCryptKeyHandle hKey, void* pPaddingInfo, byte* pbHashValue, int cbHashValue, byte* pbSignature, int cbSignature, out int pcbResult, AsymmetricPaddingMode dwFlags); 16internal static unsafe ErrorCode NCryptSignHash(SafeNCryptKeyHandle hKey, void* pPaddingInfo, ReadOnlySpan<byte> pbHashValue, Span<byte> pbSignature, out int pcbResult, AsymmetricPaddingMode dwFlags) 26private static unsafe partial ErrorCode NCryptVerifySignature(SafeNCryptKeyHandle hKey, void* pPaddingInfo, byte* pbHashValue, int cbHashValue, byte* pbSignature, int cbSignature, AsymmetricPaddingMode dwFlags); 28internal static unsafe ErrorCode NCryptVerifySignature(SafeNCryptKeyHandle hKey, void* pPaddingInfo, ReadOnlySpan<byte> pbHashValue, int cbHashValue, ReadOnlySpan<byte> pbSignature, int cbSignature, AsymmetricPaddingMode dwFlags)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CngHelpers.cs (5)
36internal static void SetExportPolicy(this SafeNCryptKeyHandle keyHandle, CngExportPolicies exportPolicy) 147this SafeNCryptKeyHandle handle, 179this SafeNCryptKeyHandle handle, 229SafeNCryptKeyHandle keyHandle, 342internal static CngKey Duplicate(this SafeNCryptKeyHandle keyHandle, bool isEphemeral)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CngHelpers.SignVerify.cs (4)
15public static unsafe byte[] SignHash(this SafeNCryptKeyHandle keyHandle, ReadOnlySpan<byte> hash, AsymmetricPaddingMode paddingMode, void* pPaddingInfo, int estimatedSize) 48this SafeNCryptKeyHandle keyHandle, 69public static unsafe bool TrySignHash(this SafeNCryptKeyHandle keyHandle, ReadOnlySpan<byte> hash, Span<byte> signature, AsymmetricPaddingMode paddingMode, void* pPaddingInfo, out int bytesWritten) 104public static unsafe bool VerifyHash(this SafeNCryptKeyHandle keyHandle, ReadOnlySpan<byte> hash, ReadOnlySpan<byte> signature, AsymmetricPaddingMode paddingMode, void* pPaddingInfo)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\DSACng.SignVerify.cs (4)
27using (SafeNCryptKeyHandle keyHandle = GetDuplicatedKeyHandle()) 45using (SafeNCryptKeyHandle keyHandle = GetDuplicatedKeyHandle()) 103using (SafeNCryptKeyHandle keyHandle = GetDuplicatedKeyHandle()) 147using (SafeNCryptKeyHandle keyHandle = GetDuplicatedKeyHandle())
src\runtime\src\libraries\Common\src\System\Security\Cryptography\ECCng.ImportExport.NamedCurve.cs (2)
144internal static SafeNCryptKeyHandle ImportKeyBlob( 152SafeNCryptKeyHandle keyHandle;
src\runtime\src\libraries\Common\src\System\Security\Cryptography\ECDsaCng.SignVerify.cs (3)
24using (SafeNCryptKeyHandle keyHandle = GetDuplicatedKeyHandle()) 47using (SafeNCryptKeyHandle keyHandle = GetDuplicatedKeyHandle()) 99using (SafeNCryptKeyHandle keyHandle = GetDuplicatedKeyHandle())
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaCng.Windows.cs (4)
259using (SafeNCryptKeyHandle duplicatedHandle = _key.Handle) 279using (SafeNCryptKeyHandle duplicatedHandle = _key.Handle) 312using (SafeNCryptKeyHandle duplicatedHandle = _key.Handle) 347using (SafeNCryptKeyHandle duplicatedHandle = _key.Handle)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemCng.Windows.cs (3)
109using (SafeNCryptKeyHandle duplicatedHandle = _key.Handle) 123using (SafeNCryptKeyHandle duplicatedHandle = _key.Handle) 245using (SafeNCryptKeyHandle duplicatedHandle = _key.Handle)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSACng.EncryptDecrypt.cs (5)
56using (SafeNCryptKeyHandle keyHandle = GetDuplicatedKeyHandle()) 138using (SafeNCryptKeyHandle keyHandle = GetDuplicatedKeyHandle()) 198private unsafe byte[] EncryptOrDecrypt(SafeNCryptKeyHandle key, ReadOnlySpan<byte> input, AsymmetricPaddingMode paddingMode, void* paddingInfo, bool encrypt) 254private static unsafe bool TryEncryptOrDecrypt(SafeNCryptKeyHandle key, ReadOnlySpan<byte> input, Span<byte> output, AsymmetricPaddingMode paddingMode, void* paddingInfo, bool encrypt, out int bytesWritten) 281SafeNCryptKeyHandle key,
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSACng.SignVerify.cs (3)
54using (SafeNCryptKeyHandle keyHandle = GetDuplicatedKeyHandle()) 90using (SafeNCryptKeyHandle keyHandle = GetDuplicatedKeyHandle()) 138using (SafeNCryptKeyHandle keyHandle = GetDuplicatedKeyHandle())
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\CertificateHelpers.Windows.cs (6)
22private static partial SafeNCryptKeyHandle CreateSafeNCryptKeyHandle(IntPtr handle, SafeHandle parentHandle); 82SafeNCryptKeyHandle? ncryptKey = TryAcquireCngPrivateKey(certContext, out CngKeyHandleOpenOptions cngHandleOptions); 128private static SafeNCryptKeyHandle? TryAcquireCngPrivateKey( 153SafeNCryptKeyHandle? privateKey = null; 181SafeNCryptKeyHandle newKeyHandle = CreateSafeNCryptKeyHandle(privateKey.DangerousGetHandle(), certificateContext); 307using (SafeNCryptKeyHandle handle = cngKey.Handle)
System\Security\Cryptography\BasicSymmetricCipherLiteNCrypt.cs (2)
98using (SafeNCryptKeyHandle keyHandle = _key.Handle) 124using (SafeNCryptKeyHandle keyHandle = _key.Handle)
System\Security\Cryptography\CngKey.Create.cs (3)
42SafeNCryptKeyHandle? keyHandle = null; 82private static void InitializeKeyProperties(SafeNCryptKeyHandle keyHandle, CngKeyCreationParameters creationParameters) 132private static void InitializeKeyUiPolicyProperties(SafeNCryptKeyHandle keyHandle, CngUIPolicy uiPolicy)
System\Security\Cryptography\CngKey.cs (2)
14private readonly SafeNCryptKeyHandle _keyHandle; 17private CngKey(SafeNCryptProviderHandle providerHandle, SafeNCryptKeyHandle keyHandle)
System\Security\Cryptography\CngKey.Exists.cs (1)
40SafeNCryptKeyHandle? keyHandle = null;
System\Security\Cryptography\CngKey.Import.cs (2)
55SafeNCryptKeyHandle keyHandle; 124SafeNCryptKeyHandle? keyHandle = null;
System\Security\Cryptography\CngKey.Open.cs (1)
39SafeNCryptKeyHandle keyHandle;
System\Security\Cryptography\CngKey.OpenHandle.cs (2)
19public static CngKey Open(SafeNCryptKeyHandle keyHandle, CngKeyHandleOpenOptions keyHandleOpenOptions) 30internal static CngKey OpenNoDuplicate(SafeNCryptKeyHandle keyHandle, CngKeyHandleOpenOptions keyHandleOpenOptions)
System\Security\Cryptography\CngKey.StandardProperties.cs (2)
89public SafeNCryptKeyHandle Handle 97internal SafeNCryptKeyHandle HandleNoDuplicate
System\Security\Cryptography\DSACng.Key.cs (1)
49private SafeNCryptKeyHandle GetDuplicatedKeyHandle()
System\Security\Cryptography\ECDiffieHellmanCng.Derive.cs (2)
137using (SafeNCryptKeyHandle localHandle = Key.Handle) 138using (SafeNCryptKeyHandle otherPartyHandle = otherPartyPublicKey.Handle)
System\Security\Cryptography\ECDsaCng.Key.cs (1)
117private SafeNCryptKeyHandle GetDuplicatedKeyHandle()
System\Security\Cryptography\RSACng.Key.cs (1)
54private SafeNCryptKeyHandle GetDuplicatedKeyHandle()
System\Security\Cryptography\X25519DiffieHellmanCng.Windows.cs (1)
82SafeNCryptKeyHandle keyHandle = ECCng.ImportKeyBlob(
System\Security\Cryptography\X509Certificates\CertificateHelpers.Windows.cs (1)
19private static partial SafeNCryptKeyHandle CreateSafeNCryptKeyHandle(IntPtr handle, SafeHandle parentHandle) =>
System\Security\Cryptography\X509Certificates\WindowsInterop.crypt32.cs (2)
12using SafeNCryptKeyHandle = Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle; 174public static bool CryptAcquireCertificatePrivateKey(SafeCertContextHandle pCert, Interop.Crypt32.CryptAcquireCertificatePrivateKeyFlags dwFlags, IntPtr pvParameters, out SafeNCryptKeyHandle phCryptProvOrNCryptKey, out int pdwKeySpec, out bool pfCallerFreeProvOrNCryptKey)
System.Security.Cryptography.Cng (1)
System.Security.Cryptography.Cng.cs (1)
5[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle))]
System.Security.Cryptography.Pkcs (1)
Internal\Cryptography\Pal\Windows\PkcsPalWindows.cs (1)
134using (SafeNCryptKeyHandle keyHandle = new SafeNCryptKeyHandle(handle.DangerousGetHandle(), handle))