153 instantiations of AsnWriter
InMemory.FunctionalTests (2)
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (2)
369AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 515AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (2)
369AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 515AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System.DirectoryServices.Protocols (1)
System\DirectoryServices\Protocols\common\DirectoryControl.cs (1)
113t_writer ??= new AsnWriter(AsnEncodingRules.BER);
System.Net.Security (3)
System\Net\NegotiateAuthenticationPal.ManagedSpnego.cs (3)
142AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 169AsnWriter mechListWriter = new AsnWriter(AsnEncodingRules.DER); 334AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System.Security.Cryptography (95)
src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (3)
77AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 289AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 365AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pbkdf2Params.xml.cs (1)
54AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\MacData.xml.cs (1)
52AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnManagedIntegerDerMaxEncodeSize);
src\libraries\Common\src\System\Security\Cryptography\Asn1\PssParamsAsn.xml.cs (4)
74AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER); 88AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER); 103AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnManagedIntegerDerMaxEncodeSize); 118AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnManagedIntegerDerMaxEncodeSize);
src\libraries\Common\src\System\Security\Cryptography\Asn1\X509ExtensionAsn.xml.cs (1)
53AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnBoolDerEncodeSize);
src\libraries\Common\src\System\Security\Cryptography\AsymmetricAlgorithmHelpers.Der.cs (1)
38AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsa.cs (3)
1838AsnWriter writer = new(AsnEncodingRules.BER, initialCapacity: pkcs8.Length); 1872AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, capacity); 1928AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsaManaged.ECDsa.cs (1)
226AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\DSAKeyFormatHelper.cs (3)
230AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 242AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 274AsnWriter inner = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (1)
155AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, MaxEncodedOidLengthForCommonHashAlgorithms);
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.cs (1)
184AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.Encrypted.cs (3)
223writer = new AsnWriter(AsnEncodingRules.DER); 401AsnWriter pkcs8Writer = new AsnWriter(AsnEncodingRules.BER); 437AsnWriter pkcs8Writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\MLDsa.cs (4)
2054AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, capacity); 2080AsnWriter writer = new(AsnEncodingRules.BER, initialCapacity: pkcs8.Length); 2109AsnWriter writer = new(AsnEncodingRules.BER, initialCapacity: pkcs8.Length); 2246AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\MLDsaPkcs8.cs (2)
53AsnWriter algorithmWriter = new(AsnEncodingRules.DER); 55AsnWriter privateKeyWriter = new(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (3)
1689AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, capacity); 1714AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 1813AsnWriter tmp = new(AsnEncodingRules.BER, initialCapacity: written);
src\libraries\Common\src\System\Security\Cryptography\MLKemPkcs8.cs (2)
53AsnWriter algorithmWriter = new(AsnEncodingRules.DER); 55AsnWriter privateKeyWriter = new(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (4)
166AsnWriter contentsWriter = new AsnWriter(AsnEncodingRules.BER); 227AsnWriter writer = new AsnWriter(AsnEncodingRules.BER); 309AsnWriter contentsWriter = new AsnWriter(AsnEncodingRules.BER); 310AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12CertBag.cs (1)
123AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeBag.cs (1)
103AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (4)
392AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 437writer = new AsnWriter(AsnEncodingRules.BER); 444writer = new AsnWriter(AsnEncodingRules.BER); 466AsnWriter valueWriter = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SecretBag.cs (1)
60AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (1)
257AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9LocalKeyId.cs (1)
34AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\RSAKeyFormatHelper.cs (2)
132AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 166AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\RSAKeyFormatHelper.Pkcs1.cs (2)
127AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 153AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\SlhDsa.cs (5)
666AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, capacity); 1879AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, capacity); 1899AsnWriter writer = new(AsnEncodingRules.BER, initialCapacity: pkcs8.Length); 1927AsnWriter writer = new(AsnEncodingRules.BER, initialCapacity: pkcs8.Length); 1992AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (3)
630AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 642AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 1206AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
System\Security\Cryptography\EccKeyFormatHelper.cs (5)
227AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 440AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 457AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 495AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 784AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\Helpers.cs (1)
521AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, MaxEncodedOidLengthForCommonHashAlgorithms);
System\Security\Cryptography\X509Certificates\Asn1\BasicConstraintsAsn.xml.cs (1)
44AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnBoolDerEncodeSize);
System\Security\Cryptography\X509Certificates\Asn1\TbsCertificateAsn.xml.cs (1)
58AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnManagedIntegerDerMaxEncodeSize);
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (1)
1088AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Build.cs (1)
362AsnWriter writer = (_writer ??= new AsnWriter(AsnEncodingRules.DER));
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.CdpExtension.cs (1)
72writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.cs (1)
178AsnWriter writer = (_writer ??= new AsnWriter(AsnEncodingRules.DER));
System\Security\Cryptography\X509Certificates\ECDsaX509SignatureGenerator.cs (2)
57AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 96AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\MLDsaX509SignatureGenerator.cs (1)
29AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, InitialCapacity);
System\Security\Cryptography\X509Certificates\OpenSslX509Encoder.cs (1)
183AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\Pkcs10CertificationRequestInfo.cs (1)
76AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\Pkcs9ExtensionRequest.cs (1)
21AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\PublicKey.cs (1)
449AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\RSAPkcs1X509SignatureGenerator.cs (1)
83AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\RSAPssX509SignatureGenerator.cs (1)
81AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\SlhDsaX509SignatureGenerator.cs (1)
29AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, InitialCapacity);
System\Security\Cryptography\X509Certificates\SubjectAlternativeNameBuilder.cs (3)
55AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 70AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 91AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\X500DistinguishedNameBuilder.cs (1)
35private readonly AsnWriter _writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\X500NameEncoder.cs (2)
123AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 511AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\X509AuthorityInformationAccessExtension.cs (1)
278AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\X509AuthorityKeyIdentifierExtension.cs (3)
241AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 311AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 410AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\X509BasicConstraintsExtension.cs (1)
157AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, initialCapacity: 11);
System\Security\Cryptography\X509Certificates\X509EnhancedKeyUsageExtension.cs (1)
67AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\X509KeyUsageExtension.cs (1)
58AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, initialCapacity: 5);
System\Security\Cryptography\X509Certificates\X509SubjectKeyIdentifierExtension.cs (1)
141AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System.Security.Cryptography.Pkcs (50)
Internal\Cryptography\Pal\AnyOS\ManagedPal.Decrypt.cs (1)
128AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs (2)
145AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 164AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
Internal\Cryptography\PkcsHelpers.cs (1)
124AsnWriter writer = new AsnWriter(ruleSet);
src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (3)
77AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 289AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 365AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\Asn1\OaepParamsAsn.xml.cs (3)
57AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER); 71AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER); 85AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pbkdf2Params.xml.cs (1)
54AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\MacData.xml.cs (1)
52AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnManagedIntegerDerMaxEncodeSize);
src\libraries\Common\src\System\Security\Cryptography\Asn1\PssParamsAsn.xml.cs (4)
74AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER); 88AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER); 103AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnManagedIntegerDerMaxEncodeSize); 118AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnManagedIntegerDerMaxEncodeSize);
src\libraries\Common\src\System\Security\Cryptography\Asn1\X509ExtensionAsn.xml.cs (1)
53AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnBoolDerEncodeSize);
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.cs (1)
184AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.Encrypted.cs (3)
223writer = new AsnWriter(AsnEncodingRules.DER); 401AsnWriter pkcs8Writer = new AsnWriter(AsnEncodingRules.BER); 437AsnWriter pkcs8Writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (4)
166AsnWriter contentsWriter = new AsnWriter(AsnEncodingRules.BER); 227AsnWriter writer = new AsnWriter(AsnEncodingRules.BER); 309AsnWriter contentsWriter = new AsnWriter(AsnEncodingRules.BER); 310AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12CertBag.cs (1)
123AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeBag.cs (1)
103AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (4)
392AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 437writer = new AsnWriter(AsnEncodingRules.BER); 444writer = new AsnWriter(AsnEncodingRules.BER); 466AsnWriter valueWriter = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SecretBag.cs (1)
60AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (1)
257AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9LocalKeyId.cs (1)
34AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\Pkcs\Asn1\EssCertIdV2.xml.cs (1)
45AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\Pkcs\Asn1\Rfc3161TimeStampReq.xml.cs (1)
70AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnBoolDerEncodeSize);
System\Security\Cryptography\Pkcs\Asn1\Rfc3161TstInfo.xml.cs (1)
71AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnBoolDerEncodeSize);
System\Security\Cryptography\Pkcs\CmsSignature.cs (1)
238AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\Pkcs\CmsSigner.cs (2)
246AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 283newSignedAttrsWriter = new AsnWriter(AsnEncodingRules.BER);
System\Security\Cryptography\Pkcs\Rfc3161TimestampRequest.cs (1)
326AsnWriter writer = new AsnWriter(ruleSet);
System\Security\Cryptography\Pkcs\Rfc3161TimestampTokenInfo.cs (2)
158AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 369AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\Pkcs\SignedCms.cs (4)
125AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 144AsnWriter detachedWriter = new AsnWriter(AsnEncodingRules.DER); 150AsnWriter attachedWriter = new AsnWriter(AsnEncodingRules.BER); 363AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\Pkcs\SignerInfo.cs (3)
161AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 315AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 621AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
597 references to AsnWriter
InMemory.FunctionalTests (2)
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (2)
369AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 515AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (2)
369AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 515AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System.DirectoryServices.Protocols (13)
System\DirectoryServices\Protocols\common\AsnWriterExtensions.cs (1)
11public static void WriteStringAsOctetString(this AsnWriter writer, string value, Encoding stringEncoding, Asn1Tag? tag = null)
System\DirectoryServices\Protocols\common\DirectoryControl.cs (12)
109private static AsnWriter? t_writer; 111internal static AsnWriter GetWriter() 339AsnWriter writer = GetWriter(); 434AsnWriter writer = GetWriter(); 481AsnWriter writer = GetWriter(); 524AsnWriter writer = GetWriter(); 578AsnWriter writer = GetWriter(); 653AsnWriter writer = GetWriter(); 750AsnWriter writer = GetWriter(); 868AsnWriter writer = GetWriter(); 1043AsnWriter writer = GetWriter(); 1136AsnWriter writer = GetWriter();
System.Formats.Asn1 (8)
System\Formats\Asn1\AsnEncodingRules.cs (1)
7/// Specifies the encoding ruleset for an <see cref="AsnReader"/> or <see cref="AsnWriter"/>.
System\Formats\Asn1\AsnWriter.cs (7)
36/// Creates a new <see cref="AsnWriter"/> with a given set of encoding rules. 55/// Initializes a new instance of <see cref="AsnWriter" /> with a given set of encoding rules and an initial capacity. 379public bool EncodedValueEquals(AsnWriter other) 540public void CopyTo(AsnWriter destination) 866/// Instances of this type are expected to be created from a <c>Push</c> member on <see cref="AsnWriter"/>, 872private readonly AsnWriter _writer; 876internal Scope(AsnWriter writer)
System.Net.Security (6)
src\libraries\Common\src\System\Security\Cryptography\Asn1Reader\AsnValueReader.cs (3)
224this AsnWriter writer, 238this AsnWriter writer, 251internal static ArraySegment<byte> RentAndEncode(this AsnWriter writer)
System\Net\NegotiateAuthenticationPal.ManagedSpnego.cs (3)
142AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 169AsnWriter mechListWriter = new AsnWriter(AsnEncodingRules.DER); 334AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System.Security.Cryptography (370)
src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (3)
77AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 289AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 365AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\Asn1\AlgorithmIdentifierAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\AttributeAsn.xml.cs (2)
18internal readonly void Encode(AsnWriter writer) 23internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\CurveAsn.xml.cs (2)
18internal readonly void Encode(AsnWriter writer) 23internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\DigestInfoAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\DirectoryStringAsn.xml.cs (1)
42internal readonly void Encode(AsnWriter writer)
src\libraries\Common\src\System\Security\Cryptography\Asn1\DssParms.xml.cs (2)
18internal readonly void Encode(AsnWriter writer) 23internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\ECDomainParameters.xml.cs (1)
36internal readonly void Encode(AsnWriter writer)
src\libraries\Common\src\System\Security\Cryptography\Asn1\ECPrivateKey.xml.cs (2)
19internal readonly void Encode(AsnWriter writer) 24internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\EdiPartyNameAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\EncryptedPrivateKeyInfoAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\FieldID.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\GeneralNameAsn.xml.cs (1)
50internal readonly void Encode(AsnWriter writer)
src\libraries\Common\src\System\Security\Cryptography\Asn1\MLDsaPrivateKeyAsn.xml.cs (1)
38internal readonly void Encode(AsnWriter writer)
src\libraries\Common\src\System\Security\Cryptography\Asn1\MLDsaPrivateKeyBothAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\MLKemPrivateKeyAsn.xml.cs (1)
38internal readonly void Encode(AsnWriter writer)
src\libraries\Common\src\System\Security\Cryptography\Asn1\MLKemPrivateKeyBothAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\OtherNameAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\PBEParameter.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\PBES2Params.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pbkdf2Params.xml.cs (3)
34internal readonly void Encode(AsnWriter writer) 39internal readonly void Encode(AsnWriter writer, Asn1Tag tag) 54AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pbkdf2SaltChoice.xml.cs (1)
36internal readonly void Encode(AsnWriter writer)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\CertBagAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\MacData.xml.cs (3)
37internal readonly void Encode(AsnWriter writer) 42internal readonly void Encode(AsnWriter writer, Asn1Tag tag) 52AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnManagedIntegerDerMaxEncodeSize);
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\PfxAsn.xml.cs (2)
18internal readonly void Encode(AsnWriter writer) 23internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\SafeBagAsn.xml.cs (2)
19internal readonly void Encode(AsnWriter writer) 24internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\SecretBagAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\CertificateChoiceAsn.xml.cs (1)
42internal readonly void Encode(AsnWriter writer)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\ContentInfoAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\EncapsulatedContentInfoAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\EncryptedContentInfoAsn.xml.cs (2)
18internal readonly void Encode(AsnWriter writer) 23internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\EncryptedDataAsn.xml.cs (2)
19internal readonly void Encode(AsnWriter writer) 24internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\IssuerAndSerialNumberAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\OtherCertificateFormat.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignedDataAsn.xml.cs (2)
22internal readonly void Encode(AsnWriter writer) 27internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignerIdentifierAsn.xml.cs (1)
36internal readonly void Encode(AsnWriter writer)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignerInfoAsn.xml.cs (2)
23internal readonly void Encode(AsnWriter writer) 28internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\PrivateKeyInfoAsn.xml.cs (2)
20internal readonly void Encode(AsnWriter writer) 25internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\PssParamsAsn.xml.cs (6)
62internal readonly void Encode(AsnWriter writer) 67internal readonly void Encode(AsnWriter writer, Asn1Tag tag) 74AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER); 88AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER); 103AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnManagedIntegerDerMaxEncodeSize); 118AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnManagedIntegerDerMaxEncodeSize);
src\libraries\Common\src\System\Security\Cryptography\Asn1\Rc2CbcParameters.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\RSAPrivateKeyAsn.xml.cs (2)
24internal readonly void Encode(AsnWriter writer) 29internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\RSAPublicKeyAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\SpecifiedECDomain.xml.cs (2)
22internal readonly void Encode(AsnWriter writer) 27internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\SubjectPublicKeyInfoAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\X509ExtensionAsn.xml.cs (3)
32internal readonly void Encode(AsnWriter writer) 37internal readonly void Encode(AsnWriter writer, Asn1Tag tag) 53AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnBoolDerEncodeSize);
src\libraries\Common\src\System\Security\Cryptography\Asn1Reader\AsnValueReader.cs (3)
224this AsnWriter writer, 238this AsnWriter writer, 251internal static ArraySegment<byte> RentAndEncode(this AsnWriter writer)
src\libraries\Common\src\System\Security\Cryptography\AsymmetricAlgorithmHelpers.Der.cs (4)
16AsnWriter writer = WriteIeee1363ToDer(input); 25AsnWriter writer = WriteIeee1363ToDer(input); 29private static AsnWriter WriteIeee1363ToDer(ReadOnlySpan<byte> input) 38AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsa.cs (17)
1034AsnWriter writer = WriteEncryptedPkcs8PrivateKeyToAsnWriter(password, pbeParameters); 1078AsnWriter writer = WriteEncryptedPkcs8PrivateKeyToAsnWriter(passwordBytes, pbeParameters); 1130AsnWriter writer = WriteEncryptedPkcs8PrivateKeyToAsnWriter(passwordBytes, pbeParameters); 1175AsnWriter writer = WriteEncryptedPkcs8PrivateKeyToAsnWriter(password, pbeParameters); 1248AsnWriter writer = WriteEncryptedPkcs8PrivateKeyToAsnWriter(password, pbeParameters); 1308AsnWriter writer = WriteEncryptedPkcs8PrivateKeyToAsnWriter(passwordBytes, pbeParameters); 1441AsnWriter writer = WriteSubjectPublicKeyToAsnWriter(); 1491AsnWriter writer = WriteSubjectPublicKeyToAsnWriter(); 1804private AsnWriter WriteEncryptedPkcs8PrivateKeyToAsnWriter(ReadOnlySpan<byte> passwordBytes, PbeParameters pbeParameters) 1806AsnWriter? tmp = null; 1819private AsnWriter WriteEncryptedPkcs8PrivateKeyToAsnWriter(ReadOnlySpan<char> password, PbeParameters pbeParameters) 1821AsnWriter? tmp = null; 1834private AsnWriter WritePkcs8ToAsnWriter() 1838AsnWriter writer = new(AsnEncodingRules.BER, initialCapacity: pkcs8.Length); 1854private AsnWriter WriteSubjectPublicKeyToAsnWriter() 1872AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, capacity); 1928AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsaManaged.ECDsa.cs (2)
226AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 276static void WriteKey(byte[] d, byte[]? x, byte[]? y, string curveOid, AsnWriter writer)
src\libraries\Common\src\System\Security\Cryptography\DSAKeyFormatHelper.cs (7)
228internal static AsnWriter WriteSubjectPublicKeyInfo(in DSAParameters dsaParameters) 230AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 240internal static AsnWriter WritePkcs8(in DSAParameters dsaParameters) 242AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 253private static void WriteAlgorithmId(AsnWriter writer, in DSAParameters dsaParameters) 270private static void WriteKeyComponent(AsnWriter writer, byte[]? component, bool bitString) 274AsnWriter inner = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\EccKeyFormatHelper.cs (1)
34internal static void WriteUncompressedPublicKey(byte[] x, byte[] y, AsnWriter writer)
src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (3)
155AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, MaxEncodedOidLengthForCommonHashAlgorithms); 211internal static CryptographicException CreateAlgorithmUnknownException(AsnWriter encodedId) 227internal static string EncodeAsnWriterToPem(string label, AsnWriter writer, bool clear = true)
src\libraries\Common\src\System\Security\Cryptography\KeyBlobHelpers.cs (1)
49internal static void WriteKeyParameterInteger(this AsnWriter writer, ReadOnlySpan<byte> integer)
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.cs (5)
161internal static AsnWriter WritePkcs8( 162AsnWriter algorithmIdentifierWriter, 163AsnWriter privateKeyWriter, 164AsnWriter? attributesWriter = null) 184AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.Encrypted.cs (11)
158internal static AsnWriter WriteEncryptedPkcs8( 160AsnWriter pkcs8Writer, 170internal static AsnWriter WriteEncryptedPkcs8( 172AsnWriter pkcs8Writer, 182private static AsnWriter WriteEncryptedPkcs8( 185AsnWriter pkcs8Writer, 196AsnWriter? writer = null; 383internal static AsnWriter ReencryptPkcs8( 401AsnWriter pkcs8Writer = new AsnWriter(AsnEncodingRules.BER); 419internal static AsnWriter ReencryptPkcs8( 437AsnWriter pkcs8Writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\MLDsa.cs (18)
662AsnWriter writer = ExportSubjectPublicKeyInfoCore(); 691AsnWriter writer = ExportSubjectPublicKeyInfoCore(); 713AsnWriter writer = ExportSubjectPublicKeyInfoCore(); 861AsnWriter writer = ExportEncryptedPkcs8PrivateKeyCore(password, pbeParameters); 908AsnWriter writer = ExportEncryptedPkcs8PrivateKeyCore(passwordBytes, pbeParameters); 977AsnWriter writer = ExportEncryptedPkcs8PrivateKeyCore(password, pbeParameters); 1037AsnWriter writer = ExportEncryptedPkcs8PrivateKeyCore(passwordBytes, pbeParameters); 1100AsnWriter writer = ExportEncryptedPkcs8PrivateKeyCore(password, pbeParameters); 1144AsnWriter writer = ExportEncryptedPkcs8PrivateKeyCore(passwordBytes, pbeParameters); 2040private AsnWriter ExportSubjectPublicKeyInfoCore() 2054AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, capacity); 2076private AsnWriter ExportEncryptedPkcs8PrivateKeyCore(ReadOnlySpan<byte> passwordBytes, PbeParameters pbeParameters) 2078AsnWriter tmp = ExportPkcs8PrivateKeyCallback(static pkcs8 => 2080AsnWriter writer = new(AsnEncodingRules.BER, initialCapacity: pkcs8.Length); 2105private AsnWriter ExportEncryptedPkcs8PrivateKeyCore(ReadOnlySpan<char> password, PbeParameters pbeParameters) 2107AsnWriter tmp = ExportPkcs8PrivateKeyCallback(static pkcs8 => 2109AsnWriter writer = new(AsnEncodingRules.BER, initialCapacity: pkcs8.Length); 2246AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\MLDsaPkcs8.cs (3)
53AsnWriter algorithmWriter = new(AsnEncodingRules.DER); 55AsnWriter privateKeyWriter = new(AsnEncodingRules.DER); 57AsnWriter pkcs8Writer = KeyFormatHelper.WritePkcs8(algorithmWriter, privateKeyWriter);
src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (14)
679AsnWriter writer = ExportSubjectPublicKeyInfoCore(); 831AsnWriter writer = ExportEncryptedPkcs8PrivateKeyCore<char>( 932AsnWriter writer = ExportEncryptedPkcs8PrivateKeyCore<byte>( 973AsnWriter writer = ExportEncryptedPkcs8PrivateKeyCore<byte>( 1014AsnWriter writer = ExportEncryptedPkcs8PrivateKeyCore<char>( 1090AsnWriter writer = ExportEncryptedPkcs8PrivateKeyCore<byte>( 1132AsnWriter writer = ExportEncryptedPkcs8PrivateKeyCore<char>( 1665private AsnWriter ExportSubjectPublicKeyInfoCore() 1689AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, capacity); 1714AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 1796private AsnWriter ExportEncryptedPkcs8PrivateKeyCore<TChar>( 1813AsnWriter tmp = new(AsnEncodingRules.BER, initialCapacity: written); 1874private delegate AsnWriter WriteEncryptedPkcs8Func<TChar>( 1876AsnWriter writer,
src\libraries\Common\src\System\Security\Cryptography\MLKemPkcs8.cs (3)
53AsnWriter algorithmWriter = new(AsnEncodingRules.DER); 55AsnWriter privateKeyWriter = new(AsnEncodingRules.DER); 57AsnWriter pkcs8Writer = KeyFormatHelper.WritePkcs8(algorithmWriter, privateKeyWriter);
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (2)
314AsnWriter source, 1019AsnWriter writer,
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (4)
166AsnWriter contentsWriter = new AsnWriter(AsnEncodingRules.BER); 227AsnWriter writer = new AsnWriter(AsnEncodingRules.BER); 309AsnWriter contentsWriter = new AsnWriter(AsnEncodingRules.BER); 310AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12CertBag.cs (1)
123AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeBag.cs (5)
56AsnWriter writer = EncodeToNewWriter(); 69AsnWriter writer = EncodeToNewWriter(); 73internal void EncodeTo(AsnWriter writer) 101private AsnWriter EncodeToNewWriter() 103AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (6)
361AsnWriter contentsWriter = Encode(); 392AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 430internal AsnWriter Encode() 432AsnWriter writer; 462AsnWriter contentsWriter = Encode(); 466AsnWriter valueWriter = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContentsBag.cs (1)
29AsnWriter writer = copyFrom.Encode();
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SecretBag.cs (1)
60AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (12)
97AsnWriter writer = WritePkcs8(); 110AsnWriter pkcs8 = WritePkcs8(); 111AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8(password, pkcs8, pbeParameters); 126AsnWriter pkcs8 = WritePkcs8(); 127AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8(passwordBytes, pkcs8, pbeParameters); 133AsnWriter writer = WritePkcs8(); 150AsnWriter pkcs8 = WritePkcs8(); 151AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8(password, pkcs8, pbeParameters); 168AsnWriter pkcs8 = WritePkcs8(); 169AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8(passwordBytes, pkcs8, pbeParameters); 235private AsnWriter WritePkcs8() 257AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9LocalKeyId.cs (1)
34AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\RSAKeyFormatHelper.cs (11)
130internal static AsnWriter WriteSubjectPublicKeyInfo(ReadOnlySpan<byte> pkcs1PublicKey) 132AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 142internal static AsnWriter WriteSubjectPublicKeyInfo(in RSAParameters rsaParameters) 144AsnWriter pkcs1PublicKey = WritePkcs1PublicKey(rsaParameters); 153AsnWriter ret = WriteSubjectPublicKeyInfo(rented.AsSpan(0, written)); 160internal static AsnWriter WritePkcs8PrivateKey( 162AsnWriter? copyFrom = null) 166AsnWriter writer = new AsnWriter(AsnEncodingRules.BER); 190internal static AsnWriter WritePkcs8PrivateKey(in RSAParameters rsaParameters) 192AsnWriter pkcs1PrivateKey = WritePkcs1PrivateKey(rsaParameters); 196private static void WriteAlgorithmIdentifier(AsnWriter writer)
src\libraries\Common\src\System\Security\Cryptography\RSAKeyFormatHelper.Pkcs1.cs (4)
120internal static AsnWriter WritePkcs1PublicKey(in RSAParameters rsaParameters) 127AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 136internal static AsnWriter WritePkcs1PrivateKey(in RSAParameters rsaParameters) 153AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\RSAOpenSsl.cs (4)
455AsnWriter writer = RSAKeyFormatHelper.WritePkcs8PrivateKey(parameters); 469AsnWriter writer = RSAKeyFormatHelper.WriteSubjectPublicKeyInfo(parameters); 503AsnWriter writer = RSAKeyFormatHelper.WriteSubjectPublicKeyInfo(source.Slice(0, read)); 619AsnWriter writer = RSAKeyFormatHelper.WritePkcs8PrivateKey(source.Slice(0, read));
src\libraries\Common\src\System\Security\Cryptography\SlhDsa.cs (18)
509AsnWriter writer = ExportSubjectPublicKeyInfoCore(); 559AsnWriter writer = ExportSubjectPublicKeyInfoCore(); 666AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, capacity); 741AsnWriter writer = ExportEncryptedPkcs8PrivateKeyCore(password, pbeParameters); 788AsnWriter writer = ExportEncryptedPkcs8PrivateKeyCore(passwordBytes, pbeParameters); 857AsnWriter writer = ExportEncryptedPkcs8PrivateKeyCore(password, pbeParameters); 917AsnWriter writer = ExportEncryptedPkcs8PrivateKeyCore(passwordBytes, pbeParameters); 980AsnWriter writer = ExportEncryptedPkcs8PrivateKeyCore(password, pbeParameters); 1031AsnWriter writer = ExportEncryptedPkcs8PrivateKeyCore(passwordBytes, pbeParameters); 1866private AsnWriter ExportSubjectPublicKeyInfoCore() 1879AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, capacity); 1895private AsnWriter ExportEncryptedPkcs8PrivateKeyCore(ReadOnlySpan<char> password, PbeParameters pbeParameters) 1897AsnWriter tmp = ExportPkcs8PrivateKeyCallback(static pkcs8 => 1899AsnWriter writer = new(AsnEncodingRules.BER, initialCapacity: pkcs8.Length); 1923private AsnWriter ExportEncryptedPkcs8PrivateKeyCore(ReadOnlySpan<byte> passwordBytes, PbeParameters pbeParameters) 1925AsnWriter tmp = ExportPkcs8PrivateKeyCallback(static pkcs8 => 1927AsnWriter writer = new(AsnEncodingRules.BER, initialCapacity: pkcs8.Length); 1992AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (3)
630AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 642AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 1206AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
System\Security\Cryptography\DSA.cs (8)
934AsnWriter pkcs8PrivateKey = WritePkcs8(); 936AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8( 957AsnWriter pkcs8PrivateKey = WritePkcs8(); 958AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8( 970AsnWriter writer = WritePkcs8(); 978AsnWriter writer = WriteSubjectPublicKeyInfo(); 982private unsafe AsnWriter WritePkcs8() 999private AsnWriter WriteSubjectPublicKeyInfo()
System\Security\Cryptography\ECAlgorithm.cs (8)
147AsnWriter pkcs8PrivateKey = EccKeyFormatHelper.WritePkcs8PrivateKey(ecParameters); 149AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8( 219AsnWriter pkcs8PrivateKey = EccKeyFormatHelper.WritePkcs8PrivateKey(ecParameters); 221AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8( 265AsnWriter writer = EccKeyFormatHelper.WritePkcs8PrivateKey(ecParameters); 301AsnWriter writer = EccKeyFormatHelper.WriteSubjectPublicKeyInfo(ecParameters); 623AsnWriter writer = EccKeyFormatHelper.WriteECPrivateKey(ecParameters); 659AsnWriter writer = EccKeyFormatHelper.WriteECPrivateKey(ecParameters);
System\Security\Cryptography\EccKeyFormatHelper.cs (21)
227AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 433internal static AsnWriter WriteSubjectPublicKeyInfo(ECParameters ecParameters) 440AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 455private static AsnWriter WriteAlgorithmIdentifier(in ECParameters ecParameters) 457AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 462private static void WriteAlgorithmIdentifier(in ECParameters ecParameters, AsnWriter writer) 472internal static AsnWriter WritePkcs8PrivateKey(ECParameters ecParameters, AttributeAsn[]? attributes = null) 482AsnWriter ecPrivateKey = WriteEcPrivateKey(ecParameters, includeDomainParameters: false); 483AsnWriter algorithmIdentifier = WriteAlgorithmIdentifier(ecParameters); 484AsnWriter? attributeWriter = WritePrivateKeyInfoAttributes(attributes); 490private static AsnWriter? WritePrivateKeyInfoAttributes(AttributeAsn[]? attributes) 495AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 508private static void WriteEcParameters(ECParameters ecParameters, AsnWriter writer) 535private static void WriteSpecifiedECDomain(ECParameters ecParameters, AsnWriter writer) 718private static void WriteCurve(in ECCurve curve, AsnWriter writer) 732private static void WriteFieldElement(byte[] fieldElement, AsnWriter writer) 744private static void WriteUncompressedBasePoint(in ECParameters ecParameters, AsnWriter writer) 772private static void WriteUncompressedPublicKey(in ECParameters ecParameters, AsnWriter writer) 777internal static AsnWriter WriteECPrivateKey(in ECParameters ecParameters) 782private static AsnWriter WriteEcPrivateKey(in ECParameters ecParameters, bool includeDomainParameters) 784AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\ECDiffieHellmanPublicKey.ExportParameters.cs (2)
53AsnWriter writer = EccKeyFormatHelper.WriteSubjectPublicKeyInfo(ecParameters); 71AsnWriter writer = EccKeyFormatHelper.WriteSubjectPublicKeyInfo(ecParameters);
System\Security\Cryptography\Helpers.cs (1)
521AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, MaxEncodedOidLengthForCommonHashAlgorithms);
System\Security\Cryptography\RSA.cs (13)
701AsnWriter pkcs1PrivateKey = WritePkcs1PrivateKey(); 707AsnWriter pkcs1PrivateKey = WritePkcs1PrivateKey(); 713AsnWriter pkcs1PublicKey = WritePkcs1PublicKey(); 719AsnWriter pkcs1PublicKey = WritePkcs1PublicKey(); 748AsnWriter writer = RSAKeyFormatHelper.WriteSubjectPublicKeyInfo(rented.AsSpan(0, pkcs1Size)); 761AsnWriter writer = WritePkcs8PrivateKey(); 765private unsafe AsnWriter WritePkcs8PrivateKey() 814AsnWriter pkcs8PrivateKey = WritePkcs8PrivateKey(); 816AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8( 837AsnWriter pkcs8PrivateKey = WritePkcs8PrivateKey(); 839AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8( 847private AsnWriter WritePkcs1PublicKey() 853private unsafe AsnWriter WritePkcs1PrivateKey()
System\Security\Cryptography\X509Certificates\Asn1\AccessDescriptionAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\X509Certificates\Asn1\BasicConstraintsAsn.xml.cs (3)
31internal readonly void Encode(AsnWriter writer) 36internal readonly void Encode(AsnWriter writer, Asn1Tag tag) 44AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnBoolDerEncodeSize);
System\Security\Cryptography\X509Certificates\Asn1\CertificateAsn.xml.cs (2)
18internal readonly void Encode(AsnWriter writer) 23internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\X509Certificates\Asn1\CertificatePolicyMappingAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\X509Certificates\Asn1\CertificateTemplateAsn.xml.cs (2)
18internal readonly void Encode(AsnWriter writer) 23internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\X509Certificates\Asn1\CertificationRequestAsn.xml.cs (2)
18internal readonly void Encode(AsnWriter writer) 23internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\X509Certificates\Asn1\CertificationRequestInfoAsn.xml.cs (2)
20internal readonly void Encode(AsnWriter writer) 25internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\X509Certificates\Asn1\DistributionPointAsn.xml.cs (2)
19internal readonly void Encode(AsnWriter writer) 24internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\X509Certificates\Asn1\DistributionPointNameAsn.xml.cs (1)
37internal readonly void Encode(AsnWriter writer)
System\Security\Cryptography\X509Certificates\Asn1\PolicyConstraintsAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\X509Certificates\Asn1\PolicyInformationAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\X509Certificates\Asn1\TbsCertificateAsn.xml.cs (3)
45internal readonly void Encode(AsnWriter writer) 50internal readonly void Encode(AsnWriter writer, Asn1Tag tag) 58AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnManagedIntegerDerMaxEncodeSize);
System\Security\Cryptography\X509Certificates\Asn1\TimeAsn.xml.cs (1)
36internal readonly void Encode(AsnWriter writer)
System\Security\Cryptography\X509Certificates\Asn1\ValidityAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (1)
1088AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Build.cs (1)
362AsnWriter writer = (_writer ??= new AsnWriter(AsnEncodingRules.DER));
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.CdpExtension.cs (1)
61AsnWriter? writer = null;
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.cs (3)
19private AsnWriter? _writer; 178AsnWriter writer = (_writer ??= new AsnWriter(AsnEncodingRules.DER)); 285private static void WriteX509Time(AsnWriter writer, DateTimeOffset time)
System\Security\Cryptography\X509Certificates\ECDsaX509SignatureGenerator.cs (2)
57AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 96AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\MLDsaX509SignatureGenerator.cs (1)
29AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, InitialCapacity);
System\Security\Cryptography\X509Certificates\OpenSslX509Encoder.cs (1)
183AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\Pkcs10CertificationRequestInfo.cs (1)
76AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\Pkcs9ExtensionRequest.cs (1)
21AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\PublicKey.cs (2)
437internal AsnWriter EncodeSubjectPublicKeyInfo() 449AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\RSAPkcs1X509SignatureGenerator.cs (1)
83AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\RSAPssX509SignatureGenerator.cs (1)
81AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\SlhDsaX509SignatureGenerator.cs (1)
29AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, InitialCapacity);
System\Security\Cryptography\X509Certificates\SubjectAlternativeNameBuilder.cs (3)
55AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 70AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 91AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\X500DistinguishedNameBuilder.cs (1)
35private readonly AsnWriter _writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\X500NameEncoder.cs (3)
123AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 511AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 645private static void WriteCryptoCharacterString(AsnWriter writer, UniversalTagNumber tagNumber, ReadOnlySpan<char> data)
System\Security\Cryptography\X509Certificates\X509AuthorityInformationAccessExtension.cs (2)
278AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 281static void WriteAccessMethod(AsnWriter writer, string oid, string value)
System\Security\Cryptography\X509Certificates\X509AuthorityKeyIdentifierExtension.cs (3)
241AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 311AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 410AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\X509BasicConstraintsExtension.cs (1)
157AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, initialCapacity: 11);
System\Security\Cryptography\X509Certificates\X509EnhancedKeyUsageExtension.cs (1)
67AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\X509Certificates\X509KeyUsageExtension.cs (1)
58AsnWriter writer = new AsnWriter(AsnEncodingRules.DER, initialCapacity: 5);
System\Security\Cryptography\X509Certificates\X509SubjectKeyIdentifierExtension.cs (2)
141AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 217AsnWriter writer = key.EncodeSubjectPublicKeyInfo();
System.Security.Cryptography.Pkcs (196)
Internal\Cryptography\Pal\AnyOS\ManagedPal.Decrypt.cs (1)
128AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs (2)
145AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 164AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
Internal\Cryptography\PkcsHelpers.cs (1)
124AsnWriter writer = new AsnWriter(ruleSet);
src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (3)
77AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 289AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 365AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\Asn1\AlgorithmIdentifierAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\AttributeAsn.xml.cs (2)
18internal readonly void Encode(AsnWriter writer) 23internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\DigestInfoAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\DirectoryStringAsn.xml.cs (1)
42internal readonly void Encode(AsnWriter writer)
src\libraries\Common\src\System\Security\Cryptography\Asn1\EdiPartyNameAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\EncryptedPrivateKeyInfoAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\GeneralNameAsn.xml.cs (1)
50internal readonly void Encode(AsnWriter writer)
src\libraries\Common\src\System\Security\Cryptography\Asn1\OaepParamsAsn.xml.cs (5)
45internal readonly void Encode(AsnWriter writer) 50internal readonly void Encode(AsnWriter writer, Asn1Tag tag) 57AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER); 71AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER); 85AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\Asn1\OtherNameAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\PBEParameter.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\PBES2Params.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pbkdf2Params.xml.cs (3)
34internal readonly void Encode(AsnWriter writer) 39internal readonly void Encode(AsnWriter writer, Asn1Tag tag) 54AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pbkdf2SaltChoice.xml.cs (1)
36internal readonly void Encode(AsnWriter writer)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\CertBagAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\MacData.xml.cs (3)
37internal readonly void Encode(AsnWriter writer) 42internal readonly void Encode(AsnWriter writer, Asn1Tag tag) 52AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnManagedIntegerDerMaxEncodeSize);
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\PfxAsn.xml.cs (2)
18internal readonly void Encode(AsnWriter writer) 23internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\SafeBagAsn.xml.cs (2)
19internal readonly void Encode(AsnWriter writer) 24internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\SecretBagAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\CertificateChoiceAsn.xml.cs (1)
42internal readonly void Encode(AsnWriter writer)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\ContentInfoAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\EncapsulatedContentInfoAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\EncryptedContentInfoAsn.xml.cs (2)
18internal readonly void Encode(AsnWriter writer) 23internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\EncryptedDataAsn.xml.cs (2)
19internal readonly void Encode(AsnWriter writer) 24internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\IssuerAndSerialNumberAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\OtherCertificateFormat.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignedDataAsn.xml.cs (2)
22internal readonly void Encode(AsnWriter writer) 27internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignerIdentifierAsn.xml.cs (1)
36internal readonly void Encode(AsnWriter writer)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignerInfoAsn.xml.cs (2)
23internal readonly void Encode(AsnWriter writer) 28internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\PrivateKeyInfoAsn.xml.cs (2)
20internal readonly void Encode(AsnWriter writer) 25internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\PssParamsAsn.xml.cs (6)
62internal readonly void Encode(AsnWriter writer) 67internal readonly void Encode(AsnWriter writer, Asn1Tag tag) 74AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER); 88AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER); 103AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnManagedIntegerDerMaxEncodeSize); 118AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnManagedIntegerDerMaxEncodeSize);
src\libraries\Common\src\System\Security\Cryptography\Asn1\Rc2CbcParameters.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\SubjectPublicKeyInfoAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
src\libraries\Common\src\System\Security\Cryptography\Asn1\X509ExtensionAsn.xml.cs (3)
32internal readonly void Encode(AsnWriter writer) 37internal readonly void Encode(AsnWriter writer, Asn1Tag tag) 53AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnBoolDerEncodeSize);
src\libraries\Common\src\System\Security\Cryptography\Asn1Reader\AsnValueReader.cs (3)
224this AsnWriter writer, 238this AsnWriter writer, 251internal static ArraySegment<byte> RentAndEncode(this AsnWriter writer)
src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (1)
211internal static CryptographicException CreateAlgorithmUnknownException(AsnWriter encodedId)
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.cs (5)
161internal static AsnWriter WritePkcs8( 162AsnWriter algorithmIdentifierWriter, 163AsnWriter privateKeyWriter, 164AsnWriter? attributesWriter = null) 184AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.Encrypted.cs (11)
158internal static AsnWriter WriteEncryptedPkcs8( 160AsnWriter pkcs8Writer, 170internal static AsnWriter WriteEncryptedPkcs8( 172AsnWriter pkcs8Writer, 182private static AsnWriter WriteEncryptedPkcs8( 185AsnWriter pkcs8Writer, 196AsnWriter? writer = null; 383internal static AsnWriter ReencryptPkcs8( 401AsnWriter pkcs8Writer = new AsnWriter(AsnEncodingRules.BER); 419internal static AsnWriter ReencryptPkcs8( 437AsnWriter pkcs8Writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (2)
314AsnWriter source, 1019AsnWriter writer,
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (4)
166AsnWriter contentsWriter = new AsnWriter(AsnEncodingRules.BER); 227AsnWriter writer = new AsnWriter(AsnEncodingRules.BER); 309AsnWriter contentsWriter = new AsnWriter(AsnEncodingRules.BER); 310AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12CertBag.cs (1)
123AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeBag.cs (5)
56AsnWriter writer = EncodeToNewWriter(); 69AsnWriter writer = EncodeToNewWriter(); 73internal void EncodeTo(AsnWriter writer) 101private AsnWriter EncodeToNewWriter() 103AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (6)
361AsnWriter contentsWriter = Encode(); 392AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 430internal AsnWriter Encode() 432AsnWriter writer; 462AsnWriter contentsWriter = Encode(); 466AsnWriter valueWriter = new AsnWriter(AsnEncodingRules.DER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContentsBag.cs (1)
29AsnWriter writer = copyFrom.Encode();
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SecretBag.cs (1)
60AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (12)
97AsnWriter writer = WritePkcs8(); 110AsnWriter pkcs8 = WritePkcs8(); 111AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8(password, pkcs8, pbeParameters); 126AsnWriter pkcs8 = WritePkcs8(); 127AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8(passwordBytes, pkcs8, pbeParameters); 133AsnWriter writer = WritePkcs8(); 150AsnWriter pkcs8 = WritePkcs8(); 151AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8(password, pkcs8, pbeParameters); 168AsnWriter pkcs8 = WritePkcs8(); 169AsnWriter writer = KeyFormatHelper.WriteEncryptedPkcs8(passwordBytes, pkcs8, pbeParameters); 235private AsnWriter WritePkcs8() 257AsnWriter writer = new AsnWriter(AsnEncodingRules.BER);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9LocalKeyId.cs (1)
34AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\Pkcs\Asn1\CadesIssuerSerial.xml.cs (2)
18internal readonly void Encode(AsnWriter writer) 23internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\Pkcs\Asn1\EnvelopedDataAsn.xml.cs (2)
21internal readonly void Encode(AsnWriter writer) 26internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\Pkcs\Asn1\EssCertId.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\Pkcs\Asn1\EssCertIdV2.xml.cs (3)
33internal readonly void Encode(AsnWriter writer) 38internal readonly void Encode(AsnWriter writer, Asn1Tag tag) 45AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\Pkcs\Asn1\KeyAgreeRecipientIdentifierAsn.xml.cs (1)
36internal readonly void Encode(AsnWriter writer)
System\Security\Cryptography\Pkcs\Asn1\KeyAgreeRecipientInfoAsn.xml.cs (2)
21internal readonly void Encode(AsnWriter writer) 26internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\Pkcs\Asn1\KeyTransRecipientInfoAsn.xml.cs (2)
19internal readonly void Encode(AsnWriter writer) 24internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\Pkcs\Asn1\MessageImprint.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\Pkcs\Asn1\OriginatorIdentifierOrKeyAsn.xml.cs (1)
38internal readonly void Encode(AsnWriter writer)
System\Security\Cryptography\Pkcs\Asn1\OriginatorInfoAsn.xml.cs (2)
18internal readonly void Encode(AsnWriter writer) 23internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\Pkcs\Asn1\OriginatorPublicKeyAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\Pkcs\Asn1\OtherKeyAttributeAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\Pkcs\Asn1\PkiStatusInfo.xml.cs (2)
18internal readonly void Encode(AsnWriter writer) 23internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\Pkcs\Asn1\PolicyInformation.xml.cs (2)
18internal readonly void Encode(AsnWriter writer) 23internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\Pkcs\Asn1\PolicyQualifierInfo.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\Pkcs\Asn1\RecipientEncryptedKeyAsn.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\Pkcs\Asn1\RecipientIdentifierAsn.xml.cs (1)
36internal readonly void Encode(AsnWriter writer)
System\Security\Cryptography\Pkcs\Asn1\RecipientInfoAsn.xml.cs (1)
36internal readonly void Encode(AsnWriter writer)
System\Security\Cryptography\Pkcs\Asn1\RecipientKeyIdentifier.xml.cs (2)
18internal readonly void Encode(AsnWriter writer) 23internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\Pkcs\Asn1\Rfc3161Accuracy.xml.cs (2)
18internal readonly void Encode(AsnWriter writer) 23internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\Pkcs\Asn1\Rfc3161TimeStampReq.xml.cs (3)
36internal readonly void Encode(AsnWriter writer) 41internal readonly void Encode(AsnWriter writer, Asn1Tag tag) 70AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnBoolDerEncodeSize);
System\Security\Cryptography\Pkcs\Asn1\Rfc3161TimeStampResp.xml.cs (2)
17internal readonly void Encode(AsnWriter writer) 22internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\Pkcs\Asn1\Rfc3161TstInfo.xml.cs (3)
40internal readonly void Encode(AsnWriter writer) 45internal readonly void Encode(AsnWriter writer, Asn1Tag tag) 71AsnWriter tmp = new AsnWriter(AsnEncodingRules.DER, initialCapacity: AsnBoolDerEncodeSize);
System\Security\Cryptography\Pkcs\Asn1\SignedAttributesSet.xml.cs (1)
35internal readonly void Encode(AsnWriter writer)
System\Security\Cryptography\Pkcs\Asn1\SigningCertificateAsn.xml.cs (2)
18internal readonly void Encode(AsnWriter writer) 23internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\Pkcs\Asn1\SigningCertificateV2Asn.xml.cs (2)
18internal readonly void Encode(AsnWriter writer) 23internal readonly void Encode(AsnWriter writer, Asn1Tag tag)
System\Security\Cryptography\Pkcs\CmsSignature.cs (1)
238AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\Pkcs\CmsSigner.cs (4)
242private byte[] PrepareAttributesToSign(ReadOnlySpan<byte> contentHash, string? contentTypeOid, out AsnWriter newSignedAttrsWriter) 246AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 303byte[] contentToSign = PrepareAttributesToSign(dataHash, contentTypeOid, out AsnWriter newSignedAttrsWriter); 323hasher.AppendData(PrepareAttributesToSign(dataHash, contentTypeOid, out AsnWriter newSignedAttrsWriter));
System\Security\Cryptography\Pkcs\Rfc3161TimestampRequest.cs (1)
326AsnWriter writer = new AsnWriter(ruleSet);
System\Security\Cryptography\Pkcs\Rfc3161TimestampTokenInfo.cs (2)
158AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 369AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\Pkcs\SignedCms.cs (4)
125AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 144AsnWriter detachedWriter = new AsnWriter(AsnEncodingRules.DER); 150AsnWriter attachedWriter = new AsnWriter(AsnEncodingRules.BER); 363AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);
System\Security\Cryptography\Pkcs\SignerInfo.cs (3)
161AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 315AsnWriter writer = new AsnWriter(AsnEncodingRules.DER); 621AsnWriter writer = new AsnWriter(AsnEncodingRules.DER);