diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2022-11-18 00:57:01 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2022-11-18 00:58:13 +0100 |
commit | 844fdd42f03a633f1dbce5d90b2ecf44698cf8b0 (patch) | |
tree | 1255d42327bb297b12dfd4e7adfd81e3fbea6762 /include/util | |
parent | da6eadc840716eb29b0175f39b2790bba166db4a (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/util')
-rw-r--r-- | include/util/util.h | 3 |
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 */ |