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