Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
AttributeAsn.cs
Go to the documentation of this file.
3
5
6internal struct AttributeAsn
7{
8 internal string AttrType;
9
11
12 internal void Encode(AsnWriter writer)
13 {
15 }
16
17 internal void Encode(AsnWriter writer, Asn1Tag tag)
18 {
19 writer.PushSequence(tag);
20 try
21 {
22 writer.WriteObjectIdentifier(AttrType);
23 }
24 catch (ArgumentException inner)
25 {
27 }
28 writer.PushSetOf();
29 for (int i = 0; i < AttrValues.Length; i++)
30 {
31 try
32 {
33 writer.WriteEncodedValue(AttrValues[i].Span);
34 }
36 {
38 }
39 }
40 writer.PopSetOf();
41 writer.PopSequence(tag);
42 }
43
48
60
62 {
66 decoded.AttrType = asnValueReader.ReadObjectIdentifier();
69 while (asnValueReader2.HasData)
70 {
71 ReadOnlySpan<byte> other = asnValueReader2.ReadEncodedValue();
72 int elementOffset;
74 list.Add(item);
75 }
76 decoded.AttrValues = list.ToArray();
77 asnValueReader.ThrowIfNotEmpty();
78 }
79}
void Add(TKey key, TValue value)
static string Cryptography_Der_Invalid_Encoding
Definition SR.cs:50
Definition SR.cs:7
static readonly Asn1Tag Sequence
Definition Asn1Tag.cs:29
static void Decode(ref System.Formats.Asn1.AsnValueReader reader, Asn1Tag expectedTag, ReadOnlyMemory< byte > rebind, out System.Security.Cryptography.Asn1.AttributeAsn decoded)
static void DecodeCore(ref System.Formats.Asn1.AsnValueReader reader, Asn1Tag expectedTag, ReadOnlyMemory< byte > rebind, out System.Security.Cryptography.Asn1.AttributeAsn decoded)
static void Decode(ref AsnValueReader reader, ReadOnlyMemory< byte > rebind, out AttributeAsn decoded)
void Encode(AsnWriter writer, Asn1Tag tag)
static void Decode(ref System.Formats.Asn1.AsnValueReader reader, ReadOnlyMemory< byte > rebind, out System.Security.Cryptography.Asn1.AttributeAsn decoded)
static void DecodeCore(ref AsnValueReader reader, Asn1Tag expectedTag, ReadOnlyMemory< byte > rebind, out AttributeAsn decoded)