1 /* 2 * Copyright (C) 2015-2018 Alibaba Group Holding Limited 3 */ 4 5 #ifndef __AWSS_PASSWD_H__ 6 #define __AWSS_PASSWD_H__ 7 8 #define KEY_MAX_LEN (40) 9 #define AES128_KEY_LEN (16) 10 #define RANDOM_MAX_LEN (16) 11 12 #if defined(__cplusplus) /* If this is a C++ compiler, use C linkage */ 13 extern "C" { 14 #endif 15 16 enum { 17 SSID_DECODE_TABLE = 0x0, 18 NOTIFY_ENCODE_TABLE, 19 DICT_CRYPT_TABLE_IDX_MAX, 20 }; 21 22 int awss_dict_crypt(char tab_idx, uint8_t *data, uint8_t len); 23 #ifdef WIFI_PROVISION_ENABLED 24 int produce_signature(uint8_t *sign, uint8_t *txt, uint32_t txt_len, 25 const char *key); 26 int awss_set_token(uint8_t token[RANDOM_MAX_LEN]); 27 #endif 28 29 extern uint8_t aes_random[RANDOM_MAX_LEN]; 30 #if defined(__cplusplus) /* If this is a C++ compiler, use C linkage */ 31 } 32 #endif 33 34 #endif 35