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