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

◆ EncodeSubIdentifier()

static int System.Formats.Asn1.AsnWriter.EncodeSubIdentifier ( Span< byte > dest,
ref BigInteger subIdentifier )
inlinestaticprivate

Definition at line 1046 of file AsnWriter.cs.

1047 {
1048 if (subIdentifier.IsZero)
1049 {
1050 dest[0] = 0;
1051 return 1;
1052 }
1054 int num = 0;
1055 do
1056 {
1058 byte b = (byte)bigInteger2;
1060 {
1061 b = (byte)(b | 0x80u);
1062 }
1063 bigInteger >>= 7;
1064 dest[num] = b;
1065 num++;
1066 }
1067 while (bigInteger != BigInteger.Zero);
1068 Reverse(dest.Slice(0, num));
1069 return num;
1070 }
static void Reverse(Span< byte > span)
Definition AsnWriter.cs:459
static BigInteger Zero
Definition BigInteger.cs:32

References System.Formats.Asn1.AsnWriter.Reverse(), and System.Numerics.BigInteger.Zero.

Referenced by System.Formats.Asn1.AsnWriter.WriteObjectIdentifierCore().