summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-11-18 00:57:01 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-11-18 00:58:13 +0100
commit844fdd42f03a633f1dbce5d90b2ecf44698cf8b0 (patch)
tree1255d42327bb297b12dfd4e7adfd81e3fbea6762 /include
parentda6eadc840716eb29b0175f39b2790bba166db4a (diff)
Add a single, central base64 decoder
Similar to the hex blob decoder, we need this once for tar and once for the filemap xattr parser. Simply add a single, central implementation to libutil, with a simple unit test, and then use it in both libtar and gensquashfs. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/util/util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/util/util.h b/include/util/util.h
index 787580c..cd32887 100644
--- a/include/util/util.h
+++ b/include/util/util.h
@@ -80,4 +80,7 @@ SQFS_INTERNAL int check_file_range_equal(sqfs_file_t *file, void *scratch,
SQFS_INTERNAL int hex_decode(const char *in, size_t in_sz,
sqfs_u8 *out, size_t out_sz);
+SQFS_INTERNAL int base64_decode(const char *in, size_t in_len,
+ sqfs_u8 *out, size_t *out_len);
+
#endif /* SQFS_UTIL_H */