18 instantiations of CngKeyBlobFormat
System.Security.Cryptography (18)
System\Security\Cryptography\CngHelpers.cs (1)
18private static readonly CngKeyBlobFormat s_cipherKeyBlobFormat = new CngKeyBlobFormat(Interop.NCrypt.NCRYPT_CIPHER_KEY_BLOB);
System\Security\Cryptography\CngKeyBlobFormat.cs (14)
93return s_eccPrivate ??= new CngKeyBlobFormat("ECCPRIVATEBLOB"); // BCRYPT_ECCPRIVATE_BLOB 101return s_eccPublic ??= new CngKeyBlobFormat("ECCPUBLICBLOB"); // BCRYPT_ECCPUBLIC_BLOB 109return s_eccFullPrivate ??= new CngKeyBlobFormat("ECCFULLPRIVATEBLOB"); // BCRYPT_ECCFULLPRIVATE_BLOB 117return s_eccFullPublic ??= new CngKeyBlobFormat("ECCFULLPUBLICBLOB"); // BCRYPT_ECCFULLPUBLIC_BLOB 125return s_genericPrivate ??= new CngKeyBlobFormat("PRIVATEBLOB"); // BCRYPT_PRIVATE_KEY_BLOB 133return s_genericPublic ??= new CngKeyBlobFormat("PUBLICBLOB"); // BCRYPT_PUBLIC_KEY_BLOB 149field ??= new CngKeyBlobFormat("PQDSAPUBLICBLOB"); // BCRYPT_PQDSA_PUBLIC_BLOB 163field ??= new CngKeyBlobFormat("PQDSAPRIVATEBLOB"); // BCRYPT_PQDSA_PRIVATE_BLOB 177field ??= new CngKeyBlobFormat("PQDSAPRIVATESEEDBLOB"); // BCRYPT_PQDSA_PRIVATE_SEED_BLOB 190public static CngKeyBlobFormat MLKemPublicBlob => field ??= new CngKeyBlobFormat("MLKEMPUBLICBLOB"); 203public static CngKeyBlobFormat MLKemPrivateBlob => field ??= new CngKeyBlobFormat("MLKEMPRIVATEBLOB"); 216public static CngKeyBlobFormat MLKemPrivateSeedBlob => field ??= new CngKeyBlobFormat("MLKEMPRIVATESEEDBLOB"); 222return s_opaqueTransport ??= new CngKeyBlobFormat("OpaqueTransport"); // NCRYPT_OPAQUETRANSPORT_BLOB 230return s_pkcs8Private ??= new CngKeyBlobFormat("PKCS8_PRIVATEKEY"); // NCRYPT_PKCS8_PRIVATE_KEY_BLOB
System\Security\Cryptography\RSACng.ImportExport.cs (3)
10new CngKeyBlobFormat(Interop.BCrypt.KeyBlobType.BCRYPT_RSAFULLPRIVATE_BLOB); 13new CngKeyBlobFormat(Interop.BCrypt.KeyBlobType.BCRYPT_RSAPRIVATE_BLOB); 16new CngKeyBlobFormat(Interop.BCrypt.KeyBlobType.BCRYPT_RSAPUBLIC_KEY_BLOB);
102 references to CngKeyBlobFormat
System.Core (1)
System.Core.cs (1)
205[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CngKeyBlobFormat))]
System.Security.Cryptography (100)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaCng.Windows.cs (5)
114ExportKey(CngKeyBlobFormat.PQDsaPublicBlob, Algorithm.PublicKeySizeInBytes, destination); 158ExportKey(CngKeyBlobFormat.PQDsaPrivateSeedBlob, Algorithm.PrivateSeedSizeInBytes, destination); 219ExportKey(CngKeyBlobFormat.PQDsaPrivateBlob, Algorithm.PrivateKeySizeInBytes, destination); 396key = CngKey.Import(pkcs8Source, CngKeyBlobFormat.Pkcs8PrivateBlob); 458private void ExportKey(CngKeyBlobFormat blobFormat, int expectedKeySize, Span<byte> destination)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaImplementation.CreateCng.cs (4)
20CngKeyBlobFormat cngBlobFormat = 21_hasPrivateKey ? CngKeyBlobFormat.PQDsaPrivateBlob : 22_hasSeed ? CngKeyBlobFormat.PQDsaPrivateSeedBlob : 23CngKeyBlobFormat.PQDsaPublicBlob;
System\Security\Cryptography\CngHelpers.cs (1)
18private static readonly CngKeyBlobFormat s_cipherKeyBlobFormat = new CngKeyBlobFormat(Interop.NCrypt.NCRYPT_CIPHER_KEY_BLOB);
System\Security\Cryptography\CngKey.Export.cs (1)
18public byte[] Export(CngKeyBlobFormat format)
System\Security\Cryptography\CngKey.Import.cs (7)
20internal static CngKey Import(ReadOnlySpan<byte> keyBlob, CngKeyBlobFormat format) 26public static CngKey Import(byte[] keyBlob, CngKeyBlobFormat format) 31internal static CngKey Import(byte[] keyBlob, string? curveName, CngKeyBlobFormat format) 37public static CngKey Import(byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) 106CngKeyBlobFormat format, 117CngKeyBlobFormat format, 156key.IsEphemeral = format != CngKeyBlobFormat.OpaqueTransportBlob;
System\Security\Cryptography\CngKeyBlobFormat.cs (41)
17public sealed class CngKeyBlobFormat : IEquatable<CngKeyBlobFormat> 36public static bool operator ==(CngKeyBlobFormat? left, CngKeyBlobFormat? right) 46public static bool operator !=(CngKeyBlobFormat? left, CngKeyBlobFormat? right) 60return Equals(obj as CngKeyBlobFormat); 63public bool Equals([NotNullWhen(true)] CngKeyBlobFormat? other) 89public static CngKeyBlobFormat EccPrivateBlob 97public static CngKeyBlobFormat EccPublicBlob 105public static CngKeyBlobFormat EccFullPrivateBlob 113public static CngKeyBlobFormat EccFullPublicBlob 121public static CngKeyBlobFormat GenericPrivateBlob 129public static CngKeyBlobFormat GenericPublicBlob 138/// Gets a <see cref="CngKeyBlobFormat"/> object that specifies a Post-Quantum Digital Signature Algorithm 142/// A <see cref="CngKeyBlobFormat"/> object that specifies a Post-Quantum Digital Signature Algorithm 148public static CngKeyBlobFormat PQDsaPublicBlob => 152/// Gets a <see cref="CngKeyBlobFormat"/> object that specifies a Post-Quantum Digital Signature Algorithm 156/// A <see cref="CngKeyBlobFormat"/> object that specifies a Post-Quantum Digital Signature Algorithm 162public static CngKeyBlobFormat PQDsaPrivateBlob => 166/// Gets a <see cref="CngKeyBlobFormat"/> object that specifies a Post-Quantum Digital Signature Algorithm 170/// A <see cref="CngKeyBlobFormat"/> object that specifies a Post-Quantum Digital Signature Algorithm 176public static CngKeyBlobFormat PQDsaPrivateSeedBlob => 180/// Gets a <see cref="CngKeyBlobFormat"/> object that specifies a Module-Lattice-Based Key-Encapsulation 184/// A <see cref="CngKeyBlobFormat"/> object that specifies a Module-Lattice-Based Key-Encapsulation 190public static CngKeyBlobFormat MLKemPublicBlob => field ??= new CngKeyBlobFormat("MLKEMPUBLICBLOB"); 193/// Gets a <see cref="CngKeyBlobFormat"/> object that specifies a Module-Lattice-Based Key-Encapsulation 197/// A <see cref="CngKeyBlobFormat"/> object that specifies a Module-Lattice-Based Key-Encapsulation 203public static CngKeyBlobFormat MLKemPrivateBlob => field ??= new CngKeyBlobFormat("MLKEMPRIVATEBLOB"); 206/// Gets a <see cref="CngKeyBlobFormat"/> object that specifies a Module-Lattice-Based Key-Encapsulation 210/// A <see cref="CngKeyBlobFormat"/> object that specifies a Module-Lattice-Based Key-Encapsulation 216public static CngKeyBlobFormat MLKemPrivateSeedBlob => field ??= new CngKeyBlobFormat("MLKEMPRIVATESEEDBLOB"); 218public static CngKeyBlobFormat OpaqueTransportBlob 226public static CngKeyBlobFormat Pkcs8PrivateBlob 234private static CngKeyBlobFormat? s_eccPrivate; 235private static CngKeyBlobFormat? s_eccPublic; 236private static CngKeyBlobFormat? s_eccFullPrivate; 237private static CngKeyBlobFormat? s_eccFullPublic; 238private static CngKeyBlobFormat? s_genericPrivate; 239private static CngKeyBlobFormat? s_genericPublic; 240private static CngKeyBlobFormat? s_opaqueTransport; 241private static CngKeyBlobFormat? s_pkcs8Private;
System\Security\Cryptography\CngPkcs8.cs (1)
25CngKey key = CngKey.Import(keyBlob, CngKeyBlobFormat.Pkcs8PrivateBlob);
System\Security\Cryptography\DSACng.ImportExport.cs (6)
11CngKeyBlobFormat blobFormat = includePrivateParameters ? 12CngKeyBlobFormat.GenericPrivateBlob : 13CngKeyBlobFormat.GenericPublicBlob; 21CngKeyBlobFormat blobFormat = includePrivate ? 22CngKeyBlobFormat.GenericPrivateBlob : 23CngKeyBlobFormat.GenericPublicBlob;
System\Security\Cryptography\ECCng.ImportExport.cs (17)
13CngKeyBlobFormat blobFormat = includePrivateParameters ? CngKeyBlobFormat.EccPrivateBlob : CngKeyBlobFormat.EccPublicBlob; 22CngKeyBlobFormat blobFormat = includePrivateParameters ? CngKeyBlobFormat.EccFullPrivateBlob : CngKeyBlobFormat.EccFullPublicBlob; 31CngKeyBlobFormat blobFormat = includePrivateParameters ? CngKeyBlobFormat.EccPrivateBlob : CngKeyBlobFormat.EccPublicBlob; 37CngKeyBlobFormat blobFormat = includePrivateParameters ? CngKeyBlobFormat.EccFullPrivateBlob : CngKeyBlobFormat.EccFullPublicBlob; 44out CngKeyBlobFormat format, 57CngKeyBlobFormat.EccFullPrivateBlob : 58CngKeyBlobFormat.EccFullPublicBlob; 63CngKeyBlobFormat.EccPrivateBlob : 64CngKeyBlobFormat.EccPublicBlob;
System\Security\Cryptography\ECDiffieHellmanCngPublicKey.cs (5)
13private readonly CngKeyBlobFormat _format; 21internal ECDiffieHellmanCngPublicKey(byte[] keyBlob, string? curveName, CngKeyBlobFormat format) : base(keyBlob) 54public CngKeyBlobFormat BlobFormat 66public static ECDiffieHellmanPublicKey FromByteArray(byte[] publicKeyBlob, CngKeyBlobFormat format) 85CngKeyBlobFormat format;
System\Security\Cryptography\RSACng.ImportExport.cs (4)
9private static readonly CngKeyBlobFormat s_rsaFullPrivateBlob = 12private static readonly CngKeyBlobFormat s_rsaPrivateBlob = 15private static readonly CngKeyBlobFormat s_rsaPublicBlob = 20CngKeyBlobFormat blobFormat = includePrivate ? s_rsaPrivateBlob : s_rsaPublicBlob;
System\Security\Cryptography\X25519DiffieHellmanCng.Windows.cs (3)
83CngKeyBlobFormat.EccPublicBlob.Format, 163CngKeyBlobFormat.EccPrivateBlob.Format : 164CngKeyBlobFormat.EccPublicBlob.Format;
System\Security\Cryptography\X509Certificates\X509Pal.Windows.PublicKey.cs (5)
84CngKeyBlobFormat blobFormat; 91blobFormat = CngKeyBlobFormat.EccFullPublicBlob; 95blobFormat = CngKeyBlobFormat.EccPublicBlob; 111blobFormat = CngKeyBlobFormat.EccPublicBlob; 161private static ArraySegment<byte> ExportKeyBlob(SafeBCryptKeyHandle bCryptKeyHandle, CngKeyBlobFormat blobFormat)
System.Security.Cryptography.Cng (1)
System.Security.Cryptography.Cng.cs (1)
13[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CngKeyBlobFormat))]