1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Replace base64 to match MIT license. 3.0.32

This commit is contained in:
winlin 2018-07-22 17:56:38 +08:00
parent 0a63448b86
commit 84f81983aa
7 changed files with 117 additions and 235 deletions

View file

@ -147,27 +147,8 @@ extern uint32_t srs_crc32_ieee(const void* buf, int size, uint32_t previous = 0)
/**
* Decode a base64-encoded string.
*
* @param out buffer for decoded data
* @param in null-terminated input string
* @param out_size size in bytes of the out buffer, must be at
* least 3/4 of the length of in
* @return number of bytes written, or a negative value in case of
* invalid input
*/
extern int srs_av_base64_decode(uint8_t* out, const char* in, int out_size);
/**
* Encode data to base64 and null-terminate.
*
* @param out buffer for encoded data
* @param out_size size in bytes of the out buffer (including the
* null terminator), must be at least AV_BASE64_SIZE(in_size)
* @param in input buffer containing the data to encode
* @param in_size size in bytes of the in buffer
* @return out or NULL in case of error
*/
extern char* srs_av_base64_encode(char* out, int out_size, const uint8_t* in, int in_size);
extern srs_error_t srs_av_base64_decode(std::string cipher, std::string& plaintext);
/**
* Calculate the output size needed to base64-encode x bytes to a