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

◆ ReadRsaPublicKey()

static void System.Security.Cryptography.RSAKeyFormatHelper.ReadRsaPublicKey ( ReadOnlyMemory< byte > keyData,
in AlgorithmIdentifierAsn algId,
out RSAParameters ret )
inlinestaticpackage

Definition at line 36 of file RSAKeyFormatHelper.cs.

37 {
38 RSAPublicKeyAsn rSAPublicKeyAsn = RSAPublicKeyAsn.Decode(keyData, AsnEncodingRules.BER);
39 ret = new RSAParameters
40 {
41 Modulus = rSAPublicKeyAsn.Modulus.ToByteArray(isUnsigned: true, isBigEndian: true),
42 Exponent = rSAPublicKeyAsn.PublicExponent.ToByteArray(isUnsigned: true, isBigEndian: true)
43 };
44 }
static RSAPublicKeyAsn Decode(ReadOnlyMemory< byte > encoded, AsnEncodingRules ruleSet)

References System.Security.Cryptography.Asn1.RSAPublicKeyAsn.Decode(), System.Security.Cryptography.Asn1.RSAPublicKeyAsn.Modulus, and System.Security.Cryptography.Asn1.RSAPublicKeyAsn.PublicExponent.

Referenced by System.Security.Cryptography.RSA.ImportRSAPublicKey().