TuyaOS
uni_base64.h
浏览该文件的文档.
1
8#ifndef _UNI_BASE64_H
9#define _UNI_BASE64_H
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15
20#define TY_BASE64_BUF_LEN_CALC(slen) (((slen) / 3 + ((slen) % 3 != 0)) * 4 + 1) // 1 for '\0'
21
33char * tuya_base64_encode(const unsigned char * bindata, char * base64, int binlength);
34
43int tuya_base64_decode(const char * base64, unsigned char * bindata);
44
45#ifdef __cplusplus
46}
47#endif
48#endif
49
char * tuya_base64_encode(const unsigned char *bindata, char *base64, int binlength)
tuya_base64_encode
int tuya_base64_decode(const char *base64, unsigned char *bindata)
tuya_base64_decode