decryptToString

open fun decryptToString(privateKey: PrivateKey, message: String): String

Decrypt a base 64 encrypted message with an RSA private key.

Return

The encrypted message string.

Parameters

privateKey

The private key which is used to decrypt the message.

message

The base 64 encrypted message to encrypt.

Throws

If the key isn't long enough to encrypt this message.

If the algorithm can't be found on the system.

If the key can't be used for this process.