rsaEncrypt

fun rsaEncrypt(message: Int, publicKey: RSAPublicKey): Long

Encrypt a number. For this to work properly, the modulus has to be bigger than the number. The formula for encryption is c = m^e mod n, where e is the public key exponent and n is the modulus.


fun rsaEncrypt(message: String, publicKey: RSAPublicKey): Pair<String, Int>