29 #if defined(CRYPTO_AES_ESP32)
38 clean(ctx.key,
sizeof(ctx.key));
53 if (len == ctx.key_bytes) {
55 memcpy(ctx.key, key, len);
63 esp_aes_encrypt(&ctx, input, output);
68 esp_aes_decrypt(&ctx, input, output);
73 clean(ctx.key,
sizeof(ctx.key));
88 #endif // CRYPTO_AES_ESP32
void decryptBlock(uint8_t *output, const uint8_t *input)
Decrypts a single block using this cipher.
AESCommon()
Constructs an AES block cipher object.
size_t blockSize() const
Size of an AES block in bytes.
virtual ~AESCommon()
Destroys this AES block cipher object after clearing sensitive information.
void clear()
Clears all security-sensitive state from this block cipher.
void encryptBlock(uint8_t *output, const uint8_t *input)
Encrypts a single block using this cipher.
virtual bool setKey(const uint8_t *key, size_t len)=0
Sets the key to use for future encryption and decryption operations.
virtual size_t keySize() const =0
Default size of the key for this block cipher, in bytes.