mirror of
https://github.com/Ai-Thinker-Open/Ai-Thinker-Open_RTL8710BX_ALIOS_SDK.git
synced 2026-08-28 01:01:34 +00:00
rel_1.6.0 init
This commit is contained in:
commit
27b3e2883d
19359 changed files with 8093121 additions and 0 deletions
48
Living_SDK/utility/base64/base64.h
Normal file
48
Living_SDK/utility/base64/base64.h
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
|
||||
*/
|
||||
|
||||
#ifndef _BASE64_H_
|
||||
#define _BASE64_H_
|
||||
|
||||
#if defined(__cplusplus) /* If this is a C++ compiler, use C linkage */
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
/**
|
||||
* @brief base64 encode
|
||||
*
|
||||
* @param[in] input: input byte stream
|
||||
* @param[in] input_len: input stream length in byte
|
||||
* @param[out] output: base64 encoded string
|
||||
* @param[in/out] output_len: [in] for output buffer size, [out] for
|
||||
* base64 encoded string length
|
||||
* @Note output buffer is not NULL-terminated
|
||||
*
|
||||
* @retval output buffer on success, otherwise NULL will return
|
||||
*/
|
||||
unsigned char *base64_encode(const unsigned char *input, int input_len,
|
||||
unsigned char *output, int *output_len);
|
||||
|
||||
/**
|
||||
* @brief base64 decode
|
||||
*
|
||||
* @param[in] input: input byte stream
|
||||
* @param[in] input_len: input stream length in byte
|
||||
* @param[out] output: base64 decoded string
|
||||
* @param[in/out] output_len: [in] for output buffer size, [out] for
|
||||
* base64 decoded string length
|
||||
* @Note output buffer is not NULL-terminated
|
||||
* @retval output buffer on success, otherwise NULL will return
|
||||
*/
|
||||
unsigned char *base64_decode(const unsigned char *input, int input_len,
|
||||
unsigned char *output, int *output_len);
|
||||
|
||||
#if defined(__cplusplus) /* If this is a C++ compiler, use C linkage */
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue