public class AESCipherText extends Object:
Structured AES encryption payload.
The payload is intentionally text-friendly and exposes both Base64 and hex representations for the generated IV, ciphertext and authentication tag.
import klyn.cryptography
key = AESKeyGenerator().generateKey()
encrypted = Cipher.aesEncrypt("secret", key)
print(encrypted.cipherTextBase64)| Modifier and Type | Member | Description |
|---|---|---|
| public readonly | cipherTextBase64cipherTextBase64 as String |
Ciphertext in Base64. |
| public readonly | cipherTextHexcipherTextHex as String |
Ciphertext in hexadecimal. |
| public readonly | ivBase64ivBase64 as String |
Initialization vector in Base64. |
| public readonly | ivHexivHex as String |
Initialization vector in hexadecimal. |
| public readonly | keySizeBitskeySizeBits as Int |
AES key size in bits. |
| public readonly | modemode as String |
AES mode used to encrypt the payload. |
| public readonly | tagBase64tagBase64 as String |
Authentication tag in Base64. |
| public readonly | tagHextagHex as String |
Authentication tag in hexadecimal. |
| public readonly | transformationtransformation as String |
Concrete OpenSSL transformation name. |
| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | authenticatedauthenticated as Boolean: |
Returns true when the payload carries an authentication tag. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | AESCipherText | Creates an AES payload object. |