diff options
author | Vladimír Čunát <vladimir.cunat@nic.cz> | 2020-02-10 09:54:48 +0100 |
---|---|---|
committer | Vladimír Čunát <vladimir.cunat@nic.cz> | 2020-02-10 09:57:09 +0100 |
commit | 09a9cda678b97491dff5032f6ca32a8fec95ce2b (patch) | |
tree | 5aabce18096a477c092d18bb80209a0f2b0540d9 /contrib | |
parent | Merge branch 'release-5-0-1' into 'master' (diff) | |
download | knot-resolver-09a9cda678b97491dff5032f6ca32a8fec95ce2b.tar.xz knot-resolver-09a9cda678b97491dff5032f6ca32a8fec95ce2b.zip |
base64_* -> kr_base64_*
GnuTLS 3.3 contained these as public symbols. This doesn't seem
important, but why not use more collision-resistant names anyway?
Details/discussion: https://github.com/CZ-NIC/knot/pull/14
Basically noone should notice, so I didn't include any NEWS entry.
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); |