mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Merge branch '3.0release' of https://github.com/ossrs/srs into 3.0release
# Conflicts: # trunk/src/kernel/srs_kernel_utility.hpp
This commit is contained in:
commit
22c5af62cf
49 changed files with 4667 additions and 4248 deletions
|
|
@ -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
|
||||
|
|
@ -180,11 +161,12 @@ extern char* srs_av_base64_encode(char* out, int out_size, const uint8_t* in, in
|
|||
* for example, p=config='139056E5A0'
|
||||
* output hex to data={0x13, 0x90, 0x56, 0xe5, 0xa0}
|
||||
*/
|
||||
extern int ff_hex_to_data(uint8_t* data, const char* p);
|
||||
extern int srs_hex_to_data(uint8_t* data, const char* p, int size);
|
||||
|
||||
/**
|
||||
* convert data string to hex.
|
||||
*/
|
||||
extern char *srs_data_to_hex(char *buff, const uint8_t *src, int s);
|
||||
extern char *srs_data_to_hex(char *des, const uint8_t *src, int len);
|
||||
|
||||
/**
|
||||
* generate the c0 chunk header for msg.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue