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

◆ Decode() [1/2]

static RSAPrivateKeyAsn System.Security.Cryptography.Asn1.RSAPrivateKeyAsn.Decode ( Asn1Tag expectedTag,
ReadOnlyMemory< byte > encoded,
AsnEncodingRules ruleSet )
inlinestaticpackage

Definition at line 31 of file RSAPrivateKeyAsn.cs.

32 {
33 try
34 {
35 AsnValueReader reader = new AsnValueReader(encoded.Span, ruleSet);
36 DecodeCore(ref reader, expectedTag, encoded, out var decoded);
37 reader.ThrowIfNotEmpty();
38 return decoded;
39 }
40 catch (AsnContentException inner)
41 {
42 throw new CryptographicException(System.SR.Cryptography_Der_Invalid_Encoding, inner);
43 }
44 }
static string Cryptography_Der_Invalid_Encoding
Definition SR.cs:50
Definition SR.cs:7
unsafe ReadOnlySpan< T > Span
static void DecodeCore(ref AsnValueReader reader, Asn1Tag expectedTag, ReadOnlyMemory< byte > rebind, out RSAPrivateKeyAsn decoded)

References System.SR.Cryptography_Der_Invalid_Encoding, System.Security.Cryptography.Asn1.RSAPrivateKeyAsn.DecodeCore(), System.ReadOnlyMemory< T >.Span, and System.Formats.Asn1.AsnValueReader.ThrowIfNotEmpty().