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

◆ GetIntegerContents()

static ReadOnlySpan< byte > System.Formats.Asn1.AsnDecoder.GetIntegerContents ( ReadOnlySpan< byte > source,
AsnEncodingRules ruleSet,
Asn1Tag expectedTag,
UniversalTagNumber tagNumber,
out int bytesConsumed )
inlinestaticprivate

Definition at line 997 of file AsnDecoder.cs.

998 {
999 int bytesConsumed2;
1001 if (primitiveContentSpan.IsEmpty)
1002 {
1003 throw new AsnContentException();
1004 }
1006 {
1007 ushort num = (ushort)(value & 0xFF80u);
1008 if (num == 0 || num == 65408)
1009 {
1010 throw new AsnContentException();
1011 }
1012 }
1014 return primitiveContentSpan;
1015 }
static bool TryReadUInt16BigEndian(ReadOnlySpan< byte > source, out ushort value)
static ReadOnlySpan< byte > GetPrimitiveContentSpan(ReadOnlySpan< byte > source, AsnEncodingRules ruleSet, Asn1Tag expectedTag, UniversalTagNumber tagNumber, out int bytesConsumed)
Definition AsnDecoder.cs:78

References System.Formats.Asn1.AsnDecoder.GetPrimitiveContentSpan(), System.source, System.Buffers.Binary.BinaryPrimitives.TryReadUInt16BigEndian(), and System.value.

Referenced by System.Formats.Asn1.AsnDecoder.ReadEnumeratedBytes(), System.Formats.Asn1.AsnDecoder.ReadIntegerBytes(), System.Formats.Asn1.AsnDecoder.TryReadSignedInteger(), and System.Formats.Asn1.AsnDecoder.TryReadUnsignedInteger().