92 references to KeyFormatHelper
System.Security.Cryptography (92)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CngPkcs8.cs (4)
163ArraySegment<byte> decrypted = KeyFormatHelper.DecryptPkcs8( 228ArraySegment<byte> decrypted = KeyFormatHelper.DecryptPkcs8(password, source, out int innerRead); 317return KeyFormatHelper.ReencryptPkcs8( 354return KeyFormatHelper.ReencryptPkcs8(
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsa.cs (6)
669KeyFormatHelper.ReadSubjectPublicKeyInfo(KnownOids, source, SubjectPublicKeyReader, out int read, out CompositeMLDsa dsa); 749return KeyFormatHelper.DecryptPkcs8( 807return KeyFormatHelper.DecryptPkcs8( 864KeyFormatHelper.ReadPkcs8(KnownOids, source, PrivateKeyReader, out int read, out CompositeMLDsa dsa); 1859return KeyFormatHelper.WriteEncryptedPkcs8(passwordBytes, tmp, pbeParameters); 1874return KeyFormatHelper.WriteEncryptedPkcs8(password, tmp, pbeParameters);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsaCng.Windows.cs (2)
140ReadOnlySpan<byte> privateKey = KeyFormatHelper.ReadPkcs8([Algorithm.Oid], pkcs8.AsSpan(), out _); 240return KeyFormatHelper.DecryptPkcs8(
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLKem.cs (6)
571KeyFormatHelper.ReadSubjectPublicKeyInfo(KnownOids, source, SubjectPublicKeyReader, out int read, out CompositeMLKem kem); 667KeyFormatHelper.ReadPkcs8(KnownOids, source, PrivateKeyReader, out int read, out CompositeMLKem kem); 781return KeyFormatHelper.DecryptPkcs8( 834return KeyFormatHelper.DecryptPkcs8( 2161return KeyFormatHelper.WriteEncryptedPkcs8(passwordBytes, tmp, pbeParameters); 2176return KeyFormatHelper.WriteEncryptedPkcs8(password, tmp, pbeParameters);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLKemCng.Windows.cs (2)
132ReadOnlySpan<byte> key = KeyFormatHelper.ReadPkcs8([Algorithm.Oid], pkcs8.AsSpan(), out _); 235return KeyFormatHelper.DecryptPkcs8(
src\runtime\src\libraries\Common\src\System\Security\Cryptography\DSAKeyFormatHelper.cs (4)
167KeyFormatHelper.ReadSubjectPublicKeyInfo<DSAParameters>( 180KeyFormatHelper.ReadPkcs8<DSAParameters>( 194KeyFormatHelper.ReadEncryptedPkcs8<DSAParameters>( 209KeyFormatHelper.ReadEncryptedPkcs8<DSAParameters>(
src\runtime\src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.Encrypted.cs (1)
339ArraySegment<byte> decrypted = KeyFormatHelper.DecryptPkcs8(passwordBytes, source, out bytesRead);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsa.cs (6)
1362KeyFormatHelper.ReadSubjectPublicKeyInfo(KnownOids, source, SubjectPublicKeyReader, out int read, out MLDsa mldsa); 1425KeyFormatHelper.ReadPkcs8(KnownOids, source, MLDsaKeyReader, out int read, out MLDsa dsa); 1488return KeyFormatHelper.DecryptPkcs8( 1537return KeyFormatHelper.DecryptPkcs8( 2103return KeyFormatHelper.WriteEncryptedPkcs8(passwordBytes, tmp, pbeParameters); 2132return KeyFormatHelper.WriteEncryptedPkcs8(password, tmp, pbeParameters);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaCng.Windows.cs (2)
486ReadOnlySpan<byte> privateKey = KeyFormatHelper.ReadPkcs8(KnownOids, pkcs8.AsSpan(), out _); 514return KeyFormatHelper.DecryptPkcs8(
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaPkcs8.cs (1)
56AsnWriter pkcs8Writer = KeyFormatHelper.WritePkcs8(algorithmWriter, privateKeyWriter);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (11)
825KeyFormatHelper.WriteEncryptedPkcs8); 924KeyFormatHelper.WriteEncryptedPkcs8); 964KeyFormatHelper.WriteEncryptedPkcs8); 1004KeyFormatHelper.WriteEncryptedPkcs8); 1078KeyFormatHelper.WriteEncryptedPkcs8); 1119KeyFormatHelper.WriteEncryptedPkcs8); 1188KeyFormatHelper.ReadSubjectPublicKeyInfo(s_knownOids, source, SubjectPublicKeyReader, out int read, out MLKem kem); 1250KeyFormatHelper.ReadPkcs8(s_knownOids, source, MLKemKeyReader, out int read, out MLKem kem); 1308return KeyFormatHelper.DecryptPkcs8( 1353return KeyFormatHelper.DecryptPkcs8( 1403return KeyFormatHelper.DecryptPkcs8(
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemPkcs8.cs (1)
56AsnWriter pkcs8Writer = KeyFormatHelper.WritePkcs8(algorithmWriter, privateKeyWriter);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (6)
111AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8(password, pkcs8, pbeParameters); 127AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8(passwordBytes, pkcs8, pbeParameters); 151AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8(password, pkcs8, pbeParameters); 169AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8(passwordBytes, pkcs8, pbeParameters); 178ArraySegment<byte> decrypted = KeyFormatHelper.DecryptPkcs8( 209ArraySegment<byte> decrypted = KeyFormatHelper.DecryptPkcs8(
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSAKeyFormatHelper.cs (3)
62KeyFormatHelper.ReadSubjectPublicKeyInfo<RSAParameters>( 72return KeyFormatHelper.ReadSubjectPublicKeyInfo( 80return KeyFormatHelper.ReadPkcs8(s_validOids, source, out bytesRead);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSAKeyFormatHelper.Encrypted.cs (2)
14KeyFormatHelper.ReadEncryptedPkcs8<RSAParameters>( 29KeyFormatHelper.ReadEncryptedPkcs8<RSAParameters>(
src\runtime\src\libraries\Common\src\System\Security\Cryptography\SlhDsa.cs (6)
1225KeyFormatHelper.ReadSubjectPublicKeyInfo(s_knownOids, source, SubjectPublicKeyReader, out int read, out SlhDsa slhDsa); 1288KeyFormatHelper.ReadPkcs8( 1367return KeyFormatHelper.DecryptPkcs8( 1416return KeyFormatHelper.DecryptPkcs8( 1914return KeyFormatHelper.WriteEncryptedPkcs8(password, tmp, pbeParameters); 1942return KeyFormatHelper.WriteEncryptedPkcs8(passwordBytes, tmp, pbeParameters);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X25519DiffieHellman.cs (11)
498KeyFormatHelper.WriteEncryptedPkcs8); 547KeyFormatHelper.WriteEncryptedPkcs8); 625KeyFormatHelper.WriteEncryptedPkcs8); 661KeyFormatHelper.WriteEncryptedPkcs8); 727KeyFormatHelper.WriteEncryptedPkcs8); 764KeyFormatHelper.WriteEncryptedPkcs8); 1006KeyFormatHelper.ReadSubjectPublicKeyInfo( 1080KeyFormatHelper.ReadPkcs8(s_knownOids, source, Pkcs8KeyReader, out int read, out X25519DiffieHellman key); 1138return KeyFormatHelper.DecryptPkcs8( 1183return KeyFormatHelper.DecryptPkcs8( 1233return KeyFormatHelper.DecryptPkcs8(
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X25519DiffieHellmanCng.Windows.cs (1)
236KeyFormatHelper.ReadEncryptedPkcs8(
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (2)
1113decrypted = KeyFormatHelper.DecryptPkcs8( 1141decrypted = KeyFormatHelper.DecryptPkcs8(
System\Security\Cryptography\DSA.cs (2)
936AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8( 958AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8(
System\Security\Cryptography\ECAlgorithm.cs (6)
149AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8( 221AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8( 365KeyFormatHelper.ReadEncryptedPkcs8<ECParameters>( 439KeyFormatHelper.ReadEncryptedPkcs8<ECParameters>( 499KeyFormatHelper.ReadPkcs8<ECParameters>( 558KeyFormatHelper.ReadSubjectPublicKeyInfo<ECParameters>(
System\Security\Cryptography\EccKeyFormatHelper.cs (4)
30KeyFormatHelper.ReadSubjectPublicKeyInfo<ECParameters>( 44KeyFormatHelper.ReadEncryptedPkcs8<ECParameters>( 59KeyFormatHelper.ReadEncryptedPkcs8<ECParameters>( 495return KeyFormatHelper.WritePkcs8(algorithmIdentifier, ecPrivateKey, attributeWriter);
System\Security\Cryptography\RSA.cs (2)
816AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8( 839AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8(
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (1)
2026decryptedPkcs8 = KeyFormatHelper.DecryptPkcs8(password, base64Buffer.AsSpan(0, base64Written), out int bytesRead);