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

◆ DecodeCore() [2/2]

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

Definition at line 23 of file Pbkdf2SaltChoice.cs.

24 {
26 Asn1Tag asn1Tag = reader.PeekTag();
27 ReadOnlySpan<byte> span = rebind.Span;
29 {
30 if (reader.TryReadPrimitiveOctetString(out var value))
31 {
32 decoded.Specified = (span.Overlaps(value, out var elementOffset) ? rebind.Slice(elementOffset, value.Length) : ((ReadOnlyMemory<byte>)value.ToArray()));
33 }
34 else
35 {
36 decoded.Specified = reader.ReadOctetString();
37 }
38 return;
39 }
41 {
42 System.Security.Cryptography.Asn1.AlgorithmIdentifierAsn.Decode(ref reader, rebind, out var decoded2);
43 decoded.OtherSource = decoded2;
44 return;
45 }
46 throw new CryptographicException();
47 }
static readonly Asn1Tag Sequence
Definition Asn1Tag.cs:29
static readonly Asn1Tag PrimitiveOctetString
Definition Asn1Tag.cs:19
bool HasSameClassAndValue(Asn1Tag other)
Definition Asn1Tag.cs:251
unsafe ReadOnlySpan< T > Span
ReadOnlyMemory< T > Slice(int start)
static void Decode(ref AsnValueReader reader, ReadOnlyMemory< byte > rebind, out AlgorithmIdentifierAsn decoded)

References System.Security.Cryptography.Asn1.AlgorithmIdentifierAsn.Decode(), System.Formats.Asn1.Asn1Tag.HasSameClassAndValue(), System.Formats.Asn1.Asn1Tag.PrimitiveOctetString, System.Formats.Asn1.Asn1Tag.Sequence, System.ReadOnlyMemory< T >.Slice(), System.ReadOnlyMemory< T >.Span, and System.value.