AESContext
Interface to low level AES encryption features.
This class provides access to AES encryption/decryption of raw data. Both AES-ECB and AES-CBC mode are supported.
enum Mode:
MODE_ECB_ENCRYPT = 0 —- AES electronic codebook encryption mode.
MODE_ECB_DECRYPT = 1 —- AES electronic codebook decryption mode.
MODE_MAX = 4 —- Maximum value for the mode enum.
- void finish ( )
Close this AES context so it can be started again. See start.
- get_iv_state ( )
Get the current IV state for this context (IV gets updated when calling update). You normally don’t need this function.
Note: This function only makes sense when the context is started with or MODE_CBC_DECRYPT.
Start the AES context in the given . A key
of either 16 or 32 bytes must always be provided, while an (initialization vector) of exactly 16 bytes, is only needed when mode
is either or MODE_CBC_DECRYPT.
- update ( PoolByteArray src )
Note: The size of src
must be a multiple of 16. Apply some padding if needed.