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

◆ ReadInteger()

static BigInteger System.Formats.Asn1.AsnDecoder.ReadInteger ( ReadOnlySpan< byte > source,
AsnEncodingRules ruleSet,
out int bytesConsumed,
Asn1Tag? expectedTag = null )
inlinestatic

Definition at line 941 of file AsnDecoder.cs.

942 {
943 int bytesConsumed2;
946 BigInteger result;
947 try
948 {
949 byte value = (byte)(((readOnlySpan[0] & 0x80u) != 0) ? byte.MaxValue : 0);
950 new Span<byte>(array, readOnlySpan.Length, array.Length - readOnlySpan.Length).Fill(value);
952 AsnWriter.Reverse(new Span<byte>(array, 0, readOnlySpan.Length));
953 result = new BigInteger(array);
954 }
955 finally
956 {
958 }
960 return result;
961 }
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
static ReadOnlySpan< byte > ReadIntegerBytes(ReadOnlySpan< byte > source, AsnEncodingRules ruleSet, out int bytesConsumed, Asn1Tag? expectedTag=null)
static void Return(byte[] array, int clearSize=-1)
Definition CryptoPool.cs:12
static byte[] Rent(int minimumLength)
Definition CryptoPool.cs:7

References System.array, System.Collections.Generic.Dictionary< TKey, TValue >.CopyTo(), System.Formats.Asn1.AsnDecoder.ReadIntegerBytes(), System.Security.Cryptography.CryptoPool.Rent(), System.Security.Cryptography.CryptoPool.Return(), System.Formats.Asn1.AsnWriter.Reverse(), System.source, and System.value.

Referenced by System.Security.Cryptography.DSAKeyFormatHelper.ReadDsaPublicKey(), System.Formats.Asn1.AsnReader.ReadInteger(), and System.Formats.Asn1.AsnValueReader.ReadInteger().