diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/base64.c | 12 | ||||
-rw-r--r-- | contrib/base64.h | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/contrib/base64.c b/contrib/base64.c index f41db400..b09319c2 100644 --- a/contrib/base64.c +++ b/contrib/base64.c @@ -81,7 +81,7 @@ static const uint8_t base64_dec[256] = { [ 42] = KO, ['U'] = 20, [128] = KO, [171] = KO, [214] = KO, }; -int32_t base64_encode(const uint8_t *in, +int32_t kr_base64_encode(const uint8_t *in, const uint32_t in_len, uint8_t *out, const uint32_t out_len) @@ -129,7 +129,7 @@ int32_t base64_encode(const uint8_t *in, return (text - out); } -int32_t base64_encode_alloc(const uint8_t *in, +int32_t kr_base64_encode_alloc(const uint8_t *in, const uint32_t in_len, uint8_t **out) { @@ -151,7 +151,7 @@ int32_t base64_encode_alloc(const uint8_t *in, } // Encode data. - int32_t ret = base64_encode(in, in_len, *out, out_len); + int32_t ret = kr_base64_encode(in, in_len, *out, out_len); if (ret < 0) { free(*out); } @@ -159,7 +159,7 @@ int32_t base64_encode_alloc(const uint8_t *in, return ret; } -int32_t base64_decode(const uint8_t *in, +int32_t kr_base64_decode(const uint8_t *in, const uint32_t in_len, uint8_t *out, const uint32_t out_len) @@ -240,7 +240,7 @@ int32_t base64_decode(const uint8_t *in, return (bin - out); } -int32_t base64_decode_alloc(const uint8_t *in, +int32_t kr_base64_decode_alloc(const uint8_t *in, const uint32_t in_len, uint8_t **out) { @@ -259,7 +259,7 @@ int32_t base64_decode_alloc(const uint8_t *in, } // Decode data. - int32_t ret = base64_decode(in, in_len, *out, out_len); + int32_t ret = kr_base64_decode(in, in_len, *out, out_len); if (ret < 0) { free(*out); } diff --git a/contrib/base64.h b/contrib/base64.h index 0684274c..c7619fc5 100644 --- a/contrib/base64.h +++ b/contrib/base64.h @@ -40,7 +40,7 @@ * \retval >=0 length of output string. * \retval KNOT_E* if error. */ -int32_t base64_encode(const uint8_t *in, +int32_t kr_base64_encode(const uint8_t *in, const uint32_t in_len, uint8_t *out, const uint32_t out_len); @@ -60,7 +60,7 @@ int32_t base64_encode(const uint8_t *in, * \retval >=0 length of output string. * \retval KNOT_E* if error. */ -int32_t base64_encode_alloc(const uint8_t *in, +int32_t kr_base64_encode_alloc(const uint8_t *in, const uint32_t in_len, uint8_t **out); @@ -79,7 +79,7 @@ int32_t base64_encode_alloc(const uint8_t *in, * \retval >=0 length of output data. * \retval KNOT_E* if error. */ -int32_t base64_decode(const uint8_t *in, +int32_t kr_base64_decode(const uint8_t *in, const uint32_t in_len, uint8_t *out, const uint32_t out_len); @@ -100,7 +100,7 @@ int32_t base64_decode(const uint8_t *in, * \retval >=0 length of output data. * \retval KNOT_E* if error. */ -int32_t base64_decode_alloc(const uint8_t *in, +int32_t kr_base64_decode_alloc(const uint8_t *in, const uint32_t in_len, uint8_t **out); |