encrypt function

BigInt encrypt(
  1. RSAPublicKey pub,
  2. BigInt m
)

Implementation

BigInt encrypt(RSAPublicKey pub, BigInt m) {
  BigInt result = m.modPow(pub.exponent!, pub.modulus!);
  return result;
}