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