public static aesCbcDecrypt(payload as AESCipherText, key as String, keyEncoding as String = "base64") as String throws CryptoException:
Convenience AES-CBC decryption helper.
| Parameter | Description |
|---|---|
payload | Structured AES-CBC payload. |
key | AES key material. |
keyEncoding | Key encoding. Defaults to base64. |
Decrypted UTF-8 text.
import klyn.cryptography
key = AESKeyGenerator().generateKey()
payload = Cipher.aesCbcEncrypt("hello", key)
print(Cipher.aesCbcDecrypt(payload, key))