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

◆ DecodeCore() [1/2]

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

Definition at line 41 of file Pbkdf2Params.cs.

42 {
43 decoded = default(Pbkdf2Params);
44 AsnValueReader reader2 = reader.ReadSequence(expectedTag);
45 Pbkdf2SaltChoice.Decode(ref reader2, rebind, out decoded.Salt);
46 if (!reader2.TryReadInt32(out decoded.IterationCount))
47 {
48 reader2.ThrowIfNotEmpty();
49 }
50 if (reader2.HasData && reader2.PeekTag().HasSameClassAndValue(Asn1Tag.Integer))
51 {
52 if (reader2.TryReadInt32(out var value))
53 {
54 decoded.KeyLength = value;
55 }
56 else
57 {
58 reader2.ThrowIfNotEmpty();
59 }
60 }
61 if (reader2.HasData && reader2.PeekTag().HasSameClassAndValue(Asn1Tag.Sequence))
62 {
63 AlgorithmIdentifierAsn.Decode(ref reader2, rebind, out decoded.Prf);
64 }
65 else
66 {
68 AlgorithmIdentifierAsn.Decode(ref reader3, rebind, out decoded.Prf);
69 }
70 reader2.ThrowIfNotEmpty();
71 }
static readonly Asn1Tag Integer
Definition Asn1Tag.cs:13
static readonly Asn1Tag Sequence
Definition Asn1Tag.cs:29
AsnValueReader ReadSequence(Asn1Tag? expectedTag=null)

References System.Security.Cryptography.Asn1.AlgorithmIdentifierAsn.Decode(), System.Security.Cryptography.Asn1.Pbkdf2SaltChoice.Decode(), System.Security.Cryptography.Asn1.Pbkdf2Params.DefaultPrf, System.Formats.Asn1.AsnValueReader.HasData, System.Formats.Asn1.Asn1Tag.HasSameClassAndValue(), System.Formats.Asn1.Asn1Tag.Integer, System.Formats.Asn1.AsnValueReader.PeekTag(), System.Formats.Asn1.AsnValueReader.ReadSequence(), System.Formats.Asn1.Asn1Tag.Sequence, System.Formats.Asn1.AsnValueReader.ThrowIfNotEmpty(), System.Formats.Asn1.AsnValueReader.TryReadInt32(), and System.value.

Referenced by System.Security.Cryptography.Asn1.Pbkdf2Params.Decode().