Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
PrivateKeyInfoAsn.cs
Go to the documentation of this file.
3
5
6internal struct PrivateKeyInfoAsn
7{
8 internal int Version;
9
11
13
15
20
35
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 }
67}
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 AsnValueReader reader, ReadOnlyMemory< byte > rebind, out AlgorithmIdentifierAsn decoded)
static void Decode(ref AsnValueReader reader, ReadOnlyMemory< byte > rebind, out AttributeAsn decoded)
static System.Security.Cryptography.Asn1.PrivateKeyInfoAsn Decode(ReadOnlyMemory< byte > encoded, AsnEncodingRules ruleSet)
static void DecodeCore(ref System.Formats.Asn1.AsnValueReader reader, Asn1Tag expectedTag, ReadOnlyMemory< byte > rebind, out System.Security.Cryptography.Asn1.PrivateKeyInfoAsn decoded)
System.Security.Cryptography.Asn1.AlgorithmIdentifierAsn PrivateKeyAlgorithm
static System.Security.Cryptography.Asn1.PrivateKeyInfoAsn Decode(Asn1Tag expectedTag, ReadOnlyMemory< byte > encoded, AsnEncodingRules ruleSet)
static PrivateKeyInfoAsn Decode(ReadOnlyMemory< byte > encoded, AsnEncodingRules ruleSet)
static void DecodeCore(ref AsnValueReader reader, Asn1Tag expectedTag, ReadOnlyMemory< byte > rebind, out PrivateKeyInfoAsn decoded)
System.Security.Cryptography.Asn1.AttributeAsn[] Attributes