decrypt

fun decrypt(text: String, encryptionKey: String, salt: String?): String

Decrypts the specified ciphertext using the given encryption key and salt (optional).

Return

The decrypted plaintext.

Parameters

text

The ciphertext to decrypt as a Base64-encoded string.

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.