diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-03-20 20:39:47 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-03-20 20:39:47 +0100 |
commit | c280d54e1bc79de4424fabc3fad011cc15587b81 (patch) | |
tree | ee2bcfa5dc9fbc298b5038a148fb6793ee9c8d69 /uclient-utils.h | |
download | uclient-c280d54e1bc79de4424fabc3fad011cc15587b81.tar.gz |
Initial import
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'uclient-utils.h')
-rw-r--r-- | uclient-utils.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/uclient-utils.h b/uclient-utils.h new file mode 100644 index 0000000..a7eaf1c --- /dev/null +++ b/uclient-utils.h @@ -0,0 +1,16 @@ +#ifndef __UCLIENT_UTILS_H +#define __UCLIENT_UTILS_H + +#include <stdbool.h> + +static inline int base64_len(int len) +{ + return ((len + 2) / 3) * 4; +} + +void base64_encode(const void *inbuf, unsigned int len, void *out); + +int uclient_urldecode(const char *in, char *out, bool decode_plus); + + +#endif |