#ifndef __EXT_AUTH_H__ #define __EXT_AUTH_H__ #define I_AM_LTE //#define I_AM_MCU #ifdef I_AM_LTE unsigned char *extGetRandStr(int *outlen); unsigned char * extGetCodeRandStr(int *outlen); #endif /*以下用于给MCU调用*/ /* MCU向LTE发AT+GAUTH获取随机串 +GAUTH:BEA6F8ECFFE4 MCU将BEA6F8ECFFE4串转换成十六进制,长度减半 然后调用extCodeBuffer,将随机串传入,对长度为targetlen的数据targetString进行加密 然后对加密后的targetString转换成字符串,长度翻倍,能过AT+SAUTH=xx发送给LTE,LTE响应: +SAUTH:NULL +SAUTH:ERROR +SAUTH:OK */ void extCodeBuffer(unsigned char *randString, int randlen, unsigned char *targetString, int targetlen); #endif