129 references to AsnDecoder
System.DirectoryServices.Protocols (18)
System\DirectoryServices\Protocols\common\DirectoryControl.cs (18)
169AsnDecoder.ReadSequence(asnSpan, AsnEncodingRules.BER, out int sequenceContentOffset, out int sequenceContentLength, out int bytesConsumed); 174asnReadSuccessful = AsnDecoder.TryReadInt32(asnSpan, AsnEncodingRules.BER, out int size, out bytesConsumed); 180cookie = AsnDecoder.ReadOctetString(asnSpan, AsnEncodingRules.BER, out bytesConsumed); 192AsnDecoder.ReadSequence(asnSpan, AsnEncodingRules.BER, out int sequenceContentOffset, out int sequenceContentLength, out int bytesConsumed); 196result = AsnDecoder.ReadEnumeratedValue<ResultCode>(asnSpan.Slice(sequenceContentOffset, sequenceContentLength), AsnEncodingRules.BER, out bytesConsumed); 207AsnDecoder.ReadSequence(asnSpan, AsnEncodingRules.BER, out int sequenceContentOffset, out int sequenceContentLength, out int bytesConsumed); 212asnReadSuccessful = AsnDecoder.TryReadInt32(asnSpan, AsnEncodingRules.BER, out int moreResults, out bytesConsumed); 216asnReadSuccessful = AsnDecoder.TryReadInt32(asnSpan, AsnEncodingRules.BER, out int count, out bytesConsumed); 220dirsyncCookie = AsnDecoder.ReadOctetString(asnSpan, AsnEncodingRules.BER, out bytesConsumed); 232AsnDecoder.ReadSequence(asnSpan, AsnEncodingRules.BER, out int sequenceContentOffset, out int sequenceContentLength, out int bytesConsumed); 237result = AsnDecoder.ReadEnumeratedValue<ResultCode>(asnSpan, AsnEncodingRules.BER, out bytesConsumed); 248asnReadSuccessful = AsnDecoder.TryReadOctetString(asnSpan, attributeNameScratchSpace, 255attributeNameBuffer = AsnDecoder.ReadOctetString(asnSpan, AsnEncodingRules.BER, out bytesConsumed, SortResponseControl.AttributeNameTag); 273AsnDecoder.ReadSequence(asnSpan, AsnEncodingRules.BER, out int sequenceContentOffset, out int sequenceContentLength, out int bytesConsumed); 278asnReadSuccessful = AsnDecoder.TryReadInt32(asnSpan, AsnEncodingRules.BER, out int position, out bytesConsumed); 282asnReadSuccessful = AsnDecoder.TryReadInt32(asnSpan, AsnEncodingRules.BER, out int count, out bytesConsumed); 286result = AsnDecoder.ReadEnumeratedValue<ResultCode>(asnSpan, AsnEncodingRules.BER, out bytesConsumed); 294context = AsnDecoder.ReadOctetString(asnSpan, AsnEncodingRules.BER, out bytesConsumed);
System.Formats.Asn1 (77)
System\Formats\Asn1\AsnDecoder.BitString.cs (7)
721bool ret = AsnDecoder.TryReadPrimitiveBitString( 731value = AsnDecoder.Slice(_data, span); 787bool ret = AsnDecoder.TryReadBitString( 839byte[] ret = AsnDecoder.ReadBitString( 895bool ret = AsnDecoder.TryReadPrimitiveBitString( 956bool ret = AsnDecoder.TryReadBitString( 1008byte[] ret = AsnDecoder.ReadBitString(
System\Formats\Asn1\AsnDecoder.Boolean.cs (2)
114bool ret = AsnDecoder.ReadBoolean(_data.Span, RuleSet, out int bytesConsumed, expectedTag); 150bool ret = AsnDecoder.ReadBoolean(_data, RuleSet, out int bytesConsumed, expectedTag);
System\Formats\Asn1\AsnDecoder.cs (8)
753internal const int MaxCERSegmentSize = AsnDecoder.MaxCERSegmentSize; 793AsnDecoder.CheckEncodingRules(ruleSet); 846AsnDecoder.ReadEncodedValue(_data.Span, RuleSet, out _, out _, out int bytesConsumed); 864AsnDecoder.ReadEncodedValue( 910internal const int MaxCERSegmentSize = AsnDecoder.MaxCERSegmentSize; 950AsnDecoder.CheckEncodingRules(ruleSet); 1002AsnDecoder.ReadEncodedValue(_data, RuleSet, out _, out _, out int bytesConsumed); 1020AsnDecoder.ReadEncodedValue(
System\Formats\Asn1\AsnDecoder.Enumerated.cs (7)
298AsnDecoder.ReadEnumeratedBytes(_data.Span, RuleSet, out int consumed, expectedTag); 300ReadOnlyMemory<byte> memory = AsnDecoder.Slice(_data, bytes); 352TEnum ret = AsnDecoder.ReadEnumeratedValue<TEnum>(_data.Span, RuleSet, out int consumed, expectedTag); 406Enum ret = AsnDecoder.ReadEnumeratedValue(_data.Span, RuleSet, enumType, out int consumed, expectedTag); 445AsnDecoder.ReadEnumeratedBytes(_data, RuleSet, out int consumed, expectedTag); 497TEnum ret = AsnDecoder.ReadEnumeratedValue<TEnum>(_data, RuleSet, out int consumed, expectedTag); 551Enum ret = AsnDecoder.ReadEnumeratedValue(_data, RuleSet, enumType, out int consumed, expectedTag);
System\Formats\Asn1\AsnDecoder.GeneralizedTime.cs (2)
433DateTimeOffset ret = AsnDecoder.ReadGeneralizedTime(_data.Span, RuleSet, out int consumed, expectedTag); 469DateTimeOffset ret = AsnDecoder.ReadGeneralizedTime(_data, RuleSet, out int consumed, expectedTag);
System\Formats\Asn1\AsnDecoder.Integer.cs (13)
550AsnDecoder.ReadIntegerBytes(_data.Span, RuleSet, out int consumed, expectedTag); 552ReadOnlyMemory<byte> ret = AsnDecoder.Slice(_data, bytes); 586BigInteger ret = AsnDecoder.ReadInteger(_data.Span, RuleSet, out int consumed, expectedTag); 625bool ret = AsnDecoder.TryReadInt32(_data.Span, RuleSet, out value, out int read, expectedTag); 665bool ret = AsnDecoder.TryReadUInt32(_data.Span, RuleSet, out value, out int read, expectedTag); 704bool ret = AsnDecoder.TryReadInt64(_data.Span, RuleSet, out value, out int read, expectedTag); 744bool ret = AsnDecoder.TryReadUInt64(_data.Span, RuleSet, out value, out int read, expectedTag); 782AsnDecoder.ReadIntegerBytes(_data, RuleSet, out int consumed, expectedTag); 816BigInteger ret = AsnDecoder.ReadInteger(_data, RuleSet, out int consumed, expectedTag); 855bool ret = AsnDecoder.TryReadInt32(_data, RuleSet, out value, out int read, expectedTag); 895bool ret = AsnDecoder.TryReadUInt32(_data, RuleSet, out value, out int read, expectedTag); 934bool ret = AsnDecoder.TryReadInt64(_data, RuleSet, out value, out int read, expectedTag); 974bool ret = AsnDecoder.TryReadUInt64(_data, RuleSet, out value, out int read, expectedTag);
System\Formats\Asn1\AsnDecoder.NamedBitList.cs (6)
486TFlagsEnum ret = AsnDecoder.ReadNamedBitListValue<TFlagsEnum>( 540Enum ret = AsnDecoder.ReadNamedBitListValue( 578BitArray ret = AsnDecoder.ReadNamedBitList(_data.Span, RuleSet, out int consumed, expectedTag); 668TFlagsEnum ret = AsnDecoder.ReadNamedBitListValue<TFlagsEnum>( 722Enum ret = AsnDecoder.ReadNamedBitListValue( 760BitArray ret = AsnDecoder.ReadNamedBitList(_data, RuleSet, out int consumed, expectedTag);
System\Formats\Asn1\AsnDecoder.Null.cs (2)
92AsnDecoder.ReadNull(_data.Span, RuleSet, out int consumed, expectedTag); 124AsnDecoder.ReadNull(_data, RuleSet, out int consumed, expectedTag);
System\Formats\Asn1\AsnDecoder.OctetString.cs (7)
577bool ret = AsnDecoder.TryReadOctetString( 624byte[] ret = AsnDecoder.ReadOctetString(_data.Span, RuleSet, out int consumed, expectedTag); 662bool ret = AsnDecoder.TryReadPrimitiveOctetString( 671contents = AsnDecoder.Slice(_data, span); 725bool ret = AsnDecoder.TryReadOctetString( 772byte[] ret = AsnDecoder.ReadOctetString(_data, RuleSet, out int consumed, expectedTag); 812bool ret = AsnDecoder.TryReadPrimitiveOctetString(
System\Formats\Asn1\AsnDecoder.Oid.cs (2)
369AsnDecoder.ReadObjectIdentifier(_data.Span, RuleSet, out int consumed, expectedTag); 405string oidValue = AsnDecoder.ReadObjectIdentifier(_data, RuleSet, out int consumed, expectedTag);
System\Formats\Asn1\AsnDecoder.Sequence.cs (2)
135AsnDecoder.ReadSequence( 186AsnDecoder.ReadSequence(
System\Formats\Asn1\AsnDecoder.SetOf.cs (2)
212AsnDecoder.ReadSetOf( 309AsnDecoder.ReadSetOf(
System\Formats\Asn1\AsnDecoder.Text.cs (9)
536bool ret = AsnDecoder.TryReadPrimitiveCharacterStringBytes( 545contents = AsnDecoder.Slice(_data, span); 598bool ret = AsnDecoder.TryReadCharacterStringBytes( 667bool ret = AsnDecoder.TryReadCharacterString( 723string ret = AsnDecoder.ReadCharacterString( 775bool ret = AsnDecoder.TryReadPrimitiveCharacterStringBytes( 832bool ret = AsnDecoder.TryReadCharacterStringBytes( 901bool ret = AsnDecoder.TryReadCharacterString( 957string ret = AsnDecoder.ReadCharacterString(
System\Formats\Asn1\AsnDecoder.UtcTime.cs (4)
274DateTimeOffset ret = AsnDecoder.ReadUtcTime( 319AsnDecoder.ReadUtcTime(_data.Span, RuleSet, out int consumed, twoDigitYearMax, expectedTag); 359DateTimeOffset ret = AsnDecoder.ReadUtcTime( 404AsnDecoder.ReadUtcTime(_data, RuleSet, out int consumed, twoDigitYearMax, expectedTag);
System\Formats\Asn1\AsnWriter.cs (3)
573bool read = AsnDecoder.TryReadEncodedValue( 661if (RuleSet != AsnEncodingRules.CER || containedLength <= AsnDecoder.MaxCERSegmentSize) 673AsnDecoder.MaxCERSegmentSize,
System\Formats\Asn1\AsnWriter.NamedBitList.cs (1)
208AsnDecoder.ReverseBitsPerByte(valueSpan);
System.Security.Cryptography (22)
src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (5)
67if (!AsnDecoder.TryReadEncodedValue(source, AsnEncodingRules.BER, out _, out _, out _, out int consumed) || 87byte[] ret = AsnDecoder.ReadOctetString(encodedOctets.Span, AsnEncodingRules.BER, out int consumed); 113string value = AsnDecoder.ReadObjectIdentifier( 133if (!AsnDecoder.TryReadEncodedValue(source, AsnEncodingRules.BER, out _, out _, out _, out int consumed)) 319DateTimeOffset value = AsnDecoder.ReadUtcTime(
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ASN1.GetIntegerBytes.cs (1)
40return AsnDecoder.ReadIntegerBytes(
src\libraries\Common\src\System\Security\Cryptography\DSAKeyFormatHelper.cs (2)
32ReadOnlySpan<byte> xSpan = AsnDecoder.ReadIntegerBytes( 98y = AsnDecoder.ReadInteger(
src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (1)
260AsnDecoder.ReadEncodedValue(data, AsnEncodingRules.BER, out _, out _, out bytesRead);
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (1)
700bool gotIv = AsnDecoder.TryReadOctetString(
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12CertBag.cs (1)
103if (!AsnDecoder.TryReadEncodedValue(
src\libraries\Common\src\System\Security\Cryptography\RSAOpenSsl.cs (2)
479AsnDecoder.ReadEncodedValue( 589AsnDecoder.ReadEncodedValue(
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.cs (1)
636if (!AsnDecoder.TryDecodeLength(lengthPart, AsnEncodingRules.BER, out int? decoded, out int decodedLength))
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (2)
142AsnDecoder.ReadSequence(data.Span, AsnEncodingRules.BER, out _, out _, out int trimLength); 835UniversalTagNumber.T61String => AsnDecoder.ReadCharacterString(
System\Security\Cryptography\EccKeyFormatHelper.cs (1)
82AsnDecoder.ReadEncodedValue(
System\Security\Cryptography\Helpers.cs (2)
166if (AsnDecoder.TryReadPrimitiveOctetString( 185byte[] ret = AsnDecoder.ReadOctetString(input, AsnEncodingRules.BER, out consumed);
System\Security\Cryptography\RSA.cs (2)
895AsnDecoder.ReadEncodedValue( 925AsnDecoder.ReadEncodedValue(
System\Security\Cryptography\X509Certificates\X509SubjectKeyIdentifierExtension.cs (1)
106bool gotContents = AsnDecoder.TryReadPrimitiveOctetString(
System.Security.Cryptography.Pkcs (12)
Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs (1)
183AsnDecoder.ReadEncodedValue(
src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (7)
67if (!AsnDecoder.TryReadEncodedValue(source, AsnEncodingRules.BER, out _, out _, out _, out int consumed) || 87byte[] ret = AsnDecoder.ReadOctetString(encodedOctets.Span, AsnEncodingRules.BER, out int consumed); 113string value = AsnDecoder.ReadObjectIdentifier( 133if (!AsnDecoder.TryReadEncodedValue(source, AsnEncodingRules.BER, out _, out _, out _, out int consumed)) 177if (AsnDecoder.TryReadPrimitiveOctetString( 196byte[] ret = AsnDecoder.ReadOctetString(input, AsnEncodingRules.BER, out consumed); 319DateTimeOffset value = AsnDecoder.ReadUtcTime(
src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (1)
260AsnDecoder.ReadEncodedValue(data, AsnEncodingRules.BER, out _, out _, out bytesRead);
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (1)
700bool gotIv = AsnDecoder.TryReadOctetString(
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12CertBag.cs (1)
103if (!AsnDecoder.TryReadEncodedValue(
System\Security\Cryptography\Pkcs\SignedCms.cs (1)
435AsnDecoder.ReadEncodedValue(