diff options
author | Steffen Trumtrar <s.trumtrar@pengutronix.de> | 2015-09-02 13:57:23 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-04-12 11:58:39 +0200 |
commit | fa414f6c610eb7b48928312db466fbed14cc8c2a (patch) | |
tree | d67920b25f6ca873bcf326edabb941b294921bd8 /include | |
parent | fd99872262951066b13753eac8d1351c9ee0fa54 (diff) | |
download | barebox-fa414f6c610eb7b48928312db466fbed14cc8c2a.tar.gz barebox-fa414f6c610eb7b48928312db466fbed14cc8c2a.tar.xz |
lib: add base64 helpers
Import the busybox-1.23.1 uuencode/base64 helper functions.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/base64.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/base64.h b/include/base64.h new file mode 100644 index 0000000000..0df510281d --- /dev/null +++ b/include/base64.h @@ -0,0 +1,9 @@ +#ifndef __BASE64_H +#define __BASE64_H + +void uuencode(char *p, const char *src, int length); +int decode_base64(char *dst, int dst_len, const char *src); + +#define BASE64_LENGTH(len) (4 * (((len) + 2) / 3)) + +#endif /* __BASE64_H */ |