17 instantiations of SafePasswordHandle
System.Security.Cryptography (17)
Microsoft\Win32\SafeHandles\SafePasswordHandle.cs (1)
108
() => new
SafePasswordHandle
((string?)null, false));
System\Security\Cryptography\X509Certificates\X509Certificate.cs (10)
99
using (var safePasswordHandle = new
SafePasswordHandle
(password, passwordProvided: true))
115
using (var safePasswordHandle = new
SafePasswordHandle
(password, passwordProvided: true))
128
using (var safePasswordHandle = new
SafePasswordHandle
(password, passwordProvided: true))
176
using (var safePasswordHandle = new
SafePasswordHandle
(password, passwordProvided: true))
188
using (var safePasswordHandle = new
SafePasswordHandle
(password, passwordProvided: true))
205
using (var safePasswordHandle = new
SafePasswordHandle
(password, passwordProvided: true))
330
using (var safePasswordHandle = new
SafePasswordHandle
(password, passwordProvided: true))
344
using (var safePasswordHandle = new
SafePasswordHandle
(password, passwordProvided: true))
375
using (SafePasswordHandle safePasswordHandle =
new
(password, passwordProvided: true))
417
using (SafePasswordHandle safePasswordHandle =
new
(password, passwordProvided: true))
System\Security\Cryptography\X509Certificates\X509Certificate2Collection.cs (6)
136
using (SafePasswordHandle safePasswordHandle =
new
(password, passwordProvided: true))
174
using (SafePasswordHandle safePasswordHandle =
new
(password, passwordProvided: true))
183
using (var safePasswordHandle = new
SafePasswordHandle
(password, passwordProvided: true))
270
using (var safePasswordHandle = new
SafePasswordHandle
(password, passwordProvided: true))
295
using (var safePasswordHandle = new
SafePasswordHandle
(password, passwordProvided: true))
321
using (var safePasswordHandle = new
SafePasswordHandle
(password, passwordProvided: true))
57 references to SafePasswordHandle
System.Security.Cryptography (57)
_generated\0\LibraryImports.g.cs (4)
4712
internal static unsafe partial bool PFXExportCertStoreEx(global::Microsoft.Win32.SafeHandles.SafeCertStoreHandle hStore, ref global::Interop.Crypt32.DATA_BLOB pPFX, global::Microsoft.Win32.SafeHandles.
SafePasswordHandle
szPassword, global::Interop.Crypt32.PKCS12_PBES2_EXPORT_PARAMS* pvPara, global::Interop.Crypt32.PFXExportFlags dwFlags)
4720
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.
SafePasswordHandle
>.ManagedToUnmanagedIn __szPassword_native__marshaller = new();
4761
internal static partial global::Microsoft.Win32.SafeHandles.SafeCertStoreHandle PFXImportCertStore(ref global::Interop.Crypt32.DATA_BLOB pPFX, global::Microsoft.Win32.SafeHandles.
SafePasswordHandle
password, global::Interop.Crypt32.PfxCertStoreFlags dwFlags)
4770
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.
SafePasswordHandle
>.ManagedToUnmanagedIn __password_native__marshaller = new();
Microsoft\Win32\SafeHandles\SafePasswordHandle.cs (3)
85
if (disposing && SafeHandleCache<
SafePasswordHandle
>.IsCachedInvalidHandle(this))
106
public static
SafePasswordHandle
InvalidHandle =>
107
SafeHandleCache<
SafePasswordHandle
>.GetInvalidHandle(
src\runtime\src\libraries\Common\src\Interop\Windows\Crypt32\Interop.PFXExportCertStoreEx.cs (1)
16
SafePasswordHandle
szPassword,
src\runtime\src\libraries\Common\src\Interop\Windows\Crypt32\Interop.PFXImportCertStore.cs (1)
12
internal static partial SafeCertStoreHandle PFXImportCertStore(ref DATA_BLOB pPFX,
SafePasswordHandle
password, PfxCertStoreFlags dwFlags);
System\Security\Cryptography\X509Certificates\CertificateHelpers.Windows.cs (1)
17
(CertificatePal)CertificatePal.FromBlob(certificate.RawData,
SafePasswordHandle
.InvalidHandle, X509KeyStorageFlags.PersistKeySet);
System\Security\Cryptography\X509Certificates\CertificatePal.cs (2)
16
SafePasswordHandle
password,
21
SafePasswordHandle
password,
System\Security\Cryptography\X509Certificates\CertificatePal.Windows.cs (4)
10
using SafePasswordHandle = Microsoft.Win32.SafeHandles.
SafePasswordHandle
;
548
public byte[] Export(X509ContentType contentType,
SafePasswordHandle
password)
558
public byte[] ExportPkcs12(Pkcs12ExportPbeParameters exportParameters,
SafePasswordHandle
password)
566
public byte[] ExportPkcs12(PbeParameters exportParameters,
SafePasswordHandle
password)
System\Security\Cryptography\X509Certificates\CertificatePal.Windows.Import.cs (3)
13
internal static partial ICertificatePal FromBlob(ReadOnlySpan<byte> rawData,
SafePasswordHandle
password, X509KeyStorageFlags keyStorageFlags)
18
internal static partial ICertificatePal FromFile(string fileName,
SafePasswordHandle
password, X509KeyStorageFlags keyStorageFlags)
23
private static CertificatePal FromBlobOrFile(ReadOnlySpan<byte> rawData, string? fileName,
SafePasswordHandle
password, X509KeyStorageFlags keyStorageFlags)
System\Security\Cryptography\X509Certificates\CertificatePal.Windows.PrivateKey.cs (1)
258
CertificatePal pal = (CertificatePal)FromBlob(RawData,
SafePasswordHandle
.InvalidHandle, X509KeyStorageFlags.PersistKeySet);
System\Security\Cryptography\X509Certificates\ICertificatePalCore.cs (3)
26
byte[] Export(X509ContentType contentType,
SafePasswordHandle
password);
27
byte[] ExportPkcs12(Pkcs12ExportPbeParameters exportParameters,
SafePasswordHandle
password);
28
byte[] ExportPkcs12(PbeParameters exportParameters,
SafePasswordHandle
password);
System\Security\Cryptography\X509Certificates\IExportPal.cs (3)
10
byte[]? Export(X509ContentType contentType,
SafePasswordHandle
password);
11
byte[] ExportPkcs12(Pkcs12ExportPbeParameters exportParameters,
SafePasswordHandle
password);
12
byte[] ExportPkcs12(PbeParameters exportParameters,
SafePasswordHandle
password);
System\Security\Cryptography\X509Certificates\StorePal.cs (2)
15
SafePasswordHandle
password,
20
SafePasswordHandle
password,
System\Security\Cryptography\X509Certificates\StorePal.Windows.Export.cs (5)
25
public byte[]? Export(X509ContentType contentType,
SafePasswordHandle
password)
91
public byte[] ExportPkcs12(Pkcs12ExportPbeParameters exportParameters,
SafePasswordHandle
password)
96
public byte[] ExportPkcs12(PbeParameters exportParameters,
SafePasswordHandle
password)
102
private unsafe byte[] ExportPkcs12Core(Pkcs12ExportPbeParameters? exportParameters,
SafePasswordHandle
password)
165
private static byte[] ReEncryptAndSealPkcs12(byte[] pkcs12,
SafePasswordHandle
password, PbeParameters newPbeParameters)
System\Security\Cryptography\X509Certificates\StorePal.Windows.Import.cs (3)
13
internal static partial ILoaderPal FromBlob(ReadOnlySpan<byte> rawData,
SafePasswordHandle
password, X509KeyStorageFlags keyStorageFlags)
18
internal static partial ILoaderPal FromFile(string fileName,
SafePasswordHandle
password, X509KeyStorageFlags keyStorageFlags)
23
private static ILoaderPal FromBlobOrFile(ReadOnlySpan<byte> rawData, string? fileName,
SafePasswordHandle
password, X509KeyStorageFlags keyStorageFlags)
System\Security\Cryptography\X509Certificates\X509Certificate.cs (11)
71
Pal = CertificatePal.FromBlob(data,
SafePasswordHandle
.InvalidHandle, X509KeyStorageFlags.DefaultKeySet);
99
using (
var
safePasswordHandle = new SafePasswordHandle(password, passwordProvided: true))
115
using (
var
safePasswordHandle = new SafePasswordHandle(password, passwordProvided: true))
128
using (
var
safePasswordHandle = new SafePasswordHandle(password, passwordProvided: true))
176
using (
var
safePasswordHandle = new SafePasswordHandle(password, passwordProvided: true))
188
using (
var
safePasswordHandle = new SafePasswordHandle(password, passwordProvided: true))
205
using (
var
safePasswordHandle = new SafePasswordHandle(password, passwordProvided: true))
330
using (
var
safePasswordHandle = new SafePasswordHandle(password, passwordProvided: true))
344
using (
var
safePasswordHandle = new SafePasswordHandle(password, passwordProvided: true))
375
using (
SafePasswordHandle
safePasswordHandle = new(password, passwordProvided: true))
417
using (
SafePasswordHandle
safePasswordHandle = new(password, passwordProvided: true))
System\Security\Cryptography\X509Certificates\X509Certificate.LegacyLimits.cs (1)
12
internal static Pkcs12LoaderLimits GetPkcs12Limits(bool fromFile,
SafePasswordHandle
safePasswordHandle)
System\Security\Cryptography\X509Certificates\X509Certificate2Collection.cs (9)
112
return storePal.Export(contentType,
SafePasswordHandle
.InvalidHandle);
136
using (
SafePasswordHandle
safePasswordHandle = new(password, passwordProvided: true))
174
using (
SafePasswordHandle
safePasswordHandle = new(password, passwordProvided: true))
183
using (
var
safePasswordHandle = new SafePasswordHandle(password, passwordProvided: true))
221
using (ILoaderPal storePal = StorePal.FromBlob(rawData,
SafePasswordHandle
.InvalidHandle, X509KeyStorageFlags.DefaultKeySet))
270
using (
var
safePasswordHandle = new SafePasswordHandle(password, passwordProvided: true))
282
using (ILoaderPal storePal = StorePal.FromFile(fileName,
SafePasswordHandle
.InvalidHandle, X509KeyStorageFlags.DefaultKeySet))
295
using (
var
safePasswordHandle = new SafePasswordHandle(password, passwordProvided: true))
321
using (
var
safePasswordHandle = new SafePasswordHandle(password, passwordProvided: true))