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

◆ DecodeCore() [2/2]

static void System.Security.Cryptography.Asn1.PrivateKeyInfoAsn.DecodeCore ( ref System::Formats::Asn1::AsnValueReader reader,
Asn1Tag expectedTag,
ReadOnlyMemory< byte > rebind,
out System::Security::Cryptography::Asn1::PrivateKeyInfoAsn decoded )
inlinestaticprivate

Definition at line 36 of file PrivateKeyInfoAsn.cs.

37 {
41 if (!reader2.TryReadInt32(out decoded.Version))
42 {
43 reader2.ThrowIfNotEmpty();
44 }
46 if (reader2.TryReadPrimitiveOctetString(out var value))
47 {
48 decoded.PrivateKey = (span.Overlaps(value, out var elementOffset) ? rebind.Slice(elementOffset, value.Length) : ((ReadOnlyMemory<byte>)value.ToArray()));
49 }
50 else
51 {
52 decoded.PrivateKey = reader2.ReadOctetString();
53 }
54 if (reader2.HasData && reader2.PeekTag().HasSameClassAndValue(new Asn1Tag(TagClass.ContextSpecific, 0)))
55 {
56 System.Formats.Asn1.AsnValueReader reader3 = reader2.ReadSetOf(new Asn1Tag(TagClass.ContextSpecific, 0));
58 while (reader3.HasData)
59 {
61 list.Add(decoded2);
62 }
63 decoded.Attributes = list.ToArray();
64 }
65 reader2.ThrowIfNotEmpty();
66 }
static void Decode(ref AsnValueReader reader, ReadOnlyMemory< byte > rebind, out AlgorithmIdentifierAsn decoded)
static void Decode(ref AsnValueReader reader, ReadOnlyMemory< byte > rebind, out AttributeAsn decoded)

References System.Security.Cryptography.Asn1.AlgorithmIdentifierAsn.Decode(), System.Security.Cryptography.Asn1.AttributeAsn.Decode(), System.list, and System.value.