RSAPrivateKeyWithInfo constructor

RSAPrivateKeyWithInfo(
  1. BigInt modulus,
  2. BigInt privateExponent,
  3. BigInt p,
  4. BigInt q,
)

Constructor from RSA private values.

Throws ArgumentError if the parameters are not suitable as for an RSA private key.

Implementation

RSAPrivateKeyWithInfo(
    BigInt modulus, BigInt privateExponent, BigInt p, BigInt q)
    : super(modulus, privateExponent, p, q) {
  if (p * q != modulus) {
    throw ArgumentError.value(modulus, 'modulus', 'inconsistent with p & q');
  }
}