public RSACrypto(byte[] key) { AsnKeyParser keyParser = new AsnKeyParser(key); rsa = new RSACryptoServiceProvider(); rsa.ImportParameters(keyParser.ParseRSAPublicKey()); }
public RSACrypto( byte[] key ) { AsnKeyParser keyParser = new AsnKeyParser( key ); rsa = new RSACryptoServiceProvider(); rsa.ImportParameters( keyParser.ParseRSAPublicKey() ); }
/// <summary> /// Initializes a new instance of the <see cref="SteamKit2.RSACrypto"/> class. /// </summary> /// <param name="key">The public key to encrypt with.</param> public RSACrypto(byte[] key) { AsnKeyParser keyParser = new AsnKeyParser(key); rsa = RSA.Create(); rsa.ImportParameters(keyParser.ParseRSAPublicKey()); }
/// <summary> /// Initializes a new instance of the <see cref="SteamKit2.RSACrypto"/> class. /// </summary> /// <param name="key">The public key to encrypt with.</param> public RSACrypto(byte[] key) { if (key == null) { throw new ArgumentNullException(nameof(key)); } AsnKeyParser keyParser = new AsnKeyParser(key); rsa = RSA.Create(); rsa.ImportParameters(keyParser.ParseRSAPublicKey()); }