1 /*
2  * Copyright (C) 2015-2018 Alibaba Group Holding Limited
3  */
4 
5 #ifndef __AWSS_CRYPT_H__
6 #define __AWSS_CRYPT_H__
7 
8 enum {
9     SEC_LVL_OPEN = 0,       /* open */
10     SEC_LVL_AES256,         /* AES256 */
11     SEC_LVL_AES128_DEFAULT, /* AES128 with default key */
12     SEC_LVL_AES128_PRODUCT, /* AES128 with key from product_sec */
13     SEC_LVL_AES128_DEVICE,  /* AES128 with key from device_sec */
14     SEC_LVL_AES128_MANU,    /* AES128 with key from manufacturer_sec */
15 };
16 
17 int aes_decrypt_string(char *cipher, char *plain, int len, int cipher_hex,
18                        int sec_lvl, char cbc, const char *rand);
19 
20 int awss_get_encrypt_type();
21 #endif
22