1 /* 2 * SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #pragma once 8 9 #include <stdint.h> 10 #include <stdbool.h> 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 enum AES_TYPE { 17 AES_ENC, 18 AES_DEC, 19 }; 20 21 enum AES_BITS { 22 AES128, 23 AES192, 24 AES256 25 }; 26 27 void ets_aes_enable(void); 28 29 void ets_aes_disable(void); 30 31 int ets_aes_setkey(enum AES_TYPE type, const void *key, enum AES_BITS bits); 32 33 int ets_aes_setkey_enc(const void *key, enum AES_BITS bits); 34 35 int ets_aes_setkey_dec(const void *key, enum AES_BITS bits); 36 37 void ets_aes_block(const void *input, void *output); 38 39 #ifdef __cplusplus 40 } 41 #endif 42