Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ TryReadPrimitiveBitStringCore()

static bool System.Formats.Asn1.AsnDecoder.TryReadPrimitiveBitStringCore ( ReadOnlySpan< byte > source,
AsnEncodingRules ruleSet,
Asn1Tag expectedTag,
out int? contentsLength,
out int headerLength,
out int unusedBitCount,
out ReadOnlySpan< byte > value,
out int bytesConsumed,
out byte normalizedLastByte )
inlinestaticprivate

Definition at line 634 of file AsnDecoder.cs.

635 {
639 if (tag.IsConstructed)
640 {
641 if (ruleSet == AsnEncodingRules.DER)
642 {
643 throw new AsnContentException(System.SR.ContentException_InvalidUnderDer_TryBerOrCer);
644 }
645 unusedBitCount = 0;
646 value = default(ReadOnlySpan<byte>);
648 bytesConsumed = 0;
649 return false;
650 }
653 return true;
654 }
static ReadOnlySpan< byte > Slice(ReadOnlySpan< byte > source, int offset, int length)
static void CheckExpectedTag(Asn1Tag tag, Asn1Tag expectedTag, UniversalTagNumber tagNumber)
static void ParsePrimitiveBitStringContents(ReadOnlySpan< byte > source, AsnEncodingRules ruleSet, out int unusedBitCount, out ReadOnlySpan< byte > value, out byte normalizedLastByte)
static Asn1Tag ReadTagAndLength(ReadOnlySpan< byte > source, AsnEncodingRules ruleSet, out int? contentsLength, out int bytesRead)
static string ContentException_InvalidUnderDer_TryBerOrCer
Definition SR.cs:58
Definition SR.cs:7

References System.Formats.Asn1.AsnDecoder.CheckExpectedTag(), System.SR.ContentException_InvalidUnderDer_TryBerOrCer, System.Formats.Asn1.Asn1Tag.IsConstructed, System.Formats.Asn1.AsnDecoder.ParsePrimitiveBitStringContents(), System.Formats.Asn1.AsnDecoder.ReadTagAndLength(), System.Formats.Asn1.AsnDecoder.Slice(), System.source, and System.value.

Referenced by System.Formats.Asn1.AsnDecoder.ReadBitString(), System.Formats.Asn1.AsnDecoder.TryReadBitString(), and System.Formats.Asn1.AsnDecoder.TryReadPrimitiveBitString().