1 #ifndef _CORE_AUTH_H_
2 #define _CORE_AUTH_H_
3 
4 #if defined(__cplusplus)
5 extern "C" {
6 #endif
7 
8 #include "core_stdinc.h"
9 #include "core_string.h"
10 #include "core_sha256.h"
11 #include "aiot_state_api.h"
12 #include "aiot_sysdep_api.h"
13 
14 #define CORE_AUTH_SDK_VERSION "sdk-c-4.0.0"
15 #define CORE_AUTH_TIMESTAMP   "2524608000000"
16 
17 int32_t core_auth_tls_psk(aiot_sysdep_portfile_t *sysdep, char **psk_id, char psk[65], char *product_key, char *device_name, char *device_secret, char *module_name);
18 int32_t core_auth_mqtt_username(aiot_sysdep_portfile_t *sysdep, char **dest, char *product_key, char *device_name, char *module_name);
19 int32_t core_auth_mqtt_password(aiot_sysdep_portfile_t *sysdep, char **dest, char *product_key, char *device_name, char *device_secret, uint8_t assigned_clientid, char *module_name);
20 int32_t core_auth_mqtt_clientid(aiot_sysdep_portfile_t *sysdep, char **dest, char *product_key, char *device_name, char *secure_mode, char *extend_clientid, uint8_t assigned_clientid, char *module_name);
21 int32_t core_auth_http_body(aiot_sysdep_portfile_t *sysdep, char **dest, char *product_key, char *device_name, char *device_secret, char *module_name);
22 
23 #if defined(__cplusplus)
24 }
25 #endif
26 
27 #endif
28 
29