public static rsaEncrypt(plainText as String, publicKeyPem as String, padding as String = "OAEP", hashAlgorithm as String = "SHA-256", outputEncoding as String = "base64") as String throws CryptoException:
Encrypts text with an RSA public key.
Supported paddings:
OAEP (recommended, default)PKCS1For OAEP, hashAlgorithm controls both the OAEP digest and MGF1 digest.
Encoded ciphertext.