encrypt
Encrypts the specified plaintext using the given encryption key and salt (optional).
Return
The encrypted ciphertext as a Base64-encoded string.
Parameters
plaintext
The plaintext to encrypt.
encryptionKey
The encryption key.
salt
The salt used for encryption (optional).
Throws
If the encryption key is not the correct length or if the salt is too short.