diff options
Diffstat (limited to 'src/base64.c')
-rw-r--r-- | src/base64.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/base64.c b/src/base64.c index bca3dfd3..4a9b4dac 100644 --- a/src/base64.c +++ b/src/base64.c @@ -48,7 +48,7 @@ static const char b64_unmap[] = "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"; /** Encode 3 raw bytes to 4 base64 characters. */ -static inline void +static void encode_chunk(uint8_t out[4], const uint8_t in[3], size_t n_in) { out[0] = b64_map[in[0] >> 2]; @@ -90,14 +90,14 @@ serd_base64_encode(uint8_t* const str, return has_newline; } -static inline uint8_t +static uint8_t unmap(const uint8_t in) { return (uint8_t)(b64_unmap[in] - 47); } /** Decode 4 base64 characters to 3 raw bytes. */ -static inline size_t +static size_t decode_chunk(const uint8_t in[4], uint8_t out[3]) { out[0] = (uint8_t)(((unmap(in[0]) << 2)) | unmap(in[1]) >> 4); |