1 instantiation of SafeCapiKeyHandle
System.Core (1)
Microsoft\Win32\SafeHandles\CapiSafeHandles.cs (1)
264SafeCapiKeyHandle handle = new SafeCapiKeyHandle();
46 references to SafeCapiKeyHandle
System.Core (46)
Microsoft\Win32\SafeHandles\CapiSafeHandles.cs (8)
246private static volatile SafeCapiKeyHandle s_invalidHandle; 257internal static SafeCapiKeyHandle InvalidHandle { 264SafeCapiKeyHandle handle = new SafeCapiKeyHandle(); 291internal SafeCapiKeyHandle Duplicate() { 293Contract.Ensures(Contract.Result<SafeCapiKeyHandle>() != null && !Contract.Result<SafeCapiKeyHandle>().IsInvalid && !Contract.Result<SafeCapiKeyHandle>().IsClosed); 295SafeCapiKeyHandle duplicate = null;
System\Security\Cryptography\AesCryptoServiceProvider.cs (7)
34private SafeCapiKeyHandle m_key; 108SafeCapiKeyHandle importedKey = CapiNative.ImportSymmetricKey(m_cspHandle, 177using (SafeCapiKeyHandle importedKey = CapiNative.ImportSymmetricKey(m_cspHandle, GetAlgorithmId(keyCopy.Length * 8), keyCopy)) { 186private ICryptoTransform CreateDecryptor(SafeCapiKeyHandle key, byte[] iv) { 243using (SafeCapiKeyHandle importedKey = CapiNative.ImportSymmetricKey(m_cspHandle, GetAlgorithmId(keyCopy.Length * 8), keyCopy)) { 252private ICryptoTransform CreateEncryptor(SafeCapiKeyHandle key, byte[] iv) { 372SafeCapiKeyHandle key = null;
System\Security\Cryptography\CapiHashAlgorithm.cs (1)
76SafeCapiKeyHandle.InvalidHandle,
System\Security\Cryptography\CapiNative.cs (22)
273SafeCapiKeyHandle hKey, 285public static extern bool CryptDecrypt(SafeCapiKeyHandle hKey, 304public static extern bool CryptDuplicateKey(SafeCapiKeyHandle hKey, 307[Out] out SafeCapiKeyHandle phKey); 317public static extern bool CryptEncrypt(SafeCapiKeyHandle hKey, 333public static extern bool CryptExportKey(SafeCapiKeyHandle hKey, 334SafeCapiKeyHandle hExpKey, 350[Out] out SafeCapiKeyHandle phKey); 416SafeCapiKeyHandle hPubKey, 418[Out] out SafeCapiKeyHandle phKey); 428public static extern bool CryptSetKeyParam(SafeCapiKeyHandle hKey, 541internal static byte[] ExportSymmetricKey(SafeCapiKeyHandle key) { 551SafeCapiKeyHandle.InvalidHandle, 565SafeCapiKeyHandle.InvalidHandle, 717internal static SafeCapiKeyHandle ImportSymmetricKey(SafeCspHandle provider, AlgorithmId algorithm, byte[] key) { 721Contract.Ensures(Contract.Result<SafeCapiKeyHandle>() != null && 722!Contract.Result<SafeCapiKeyHandle>().IsInvalid && 723!Contract.Result<SafeCapiKeyHandle>().IsClosed); 751SafeCapiKeyHandle importedKey = null; 758SafeCapiKeyHandle.InvalidHandle, 776internal static void SetKeyParameter(SafeCapiKeyHandle key, KeyParameter parameter, int value) { 788internal static void SetKeyParameter(SafeCapiKeyHandle key, KeyParameter parameter, byte[] value) {
System\Security\Cryptography\CapiSymmetricAlgorithm.cs (8)
35private SafeCapiKeyHandle m_key; 45SafeCapiKeyHandle key, 580private static SafeCapiKeyHandle SetupKey(SafeCapiKeyHandle key, byte[] iv, CipherMode cipherMode, int feedbackSize) { 584Contract.Ensures(Contract.Result<SafeCapiKeyHandle>() != null && 585!Contract.Result<SafeCapiKeyHandle>().IsInvalid && 586!Contract.Result<SafeCapiKeyHandle>().IsClosed); 589SafeCapiKeyHandle encryptionKey = key.Duplicate();