diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-11-18 16:15:56 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-11-18 16:15:56 +0000 |
commit | 257deb32c83dbdd989d2021cdbd5ad7dbb28386f (patch) | |
tree | 2a29e2222196f351e62e1316ddaeefcb405fbb1a /include/nsutils/base64.h | |
download | libnsutils-257deb32c83dbdd989d2021cdbd5ad7dbb28386f.tar.gz libnsutils-257deb32c83dbdd989d2021cdbd5ad7dbb28386f.tar.bz2 |
Initial nsutils library with base64 implementation an tests
Diffstat (limited to 'include/nsutils/base64.h')
-rw-r--r-- | include/nsutils/base64.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/nsutils/base64.h b/include/nsutils/base64.h new file mode 100644 index 0000000..139a1b6 --- /dev/null +++ b/include/nsutils/base64.h @@ -0,0 +1,30 @@ +/* + * Copyright 2014 Vincent Sanders <vince@netsurf-browser.org> + * + * This file is part of libnsutils. + * + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + */ + +/** + * \file + * Base64 encoding and decoding interface. + */ + +#ifndef NSUTILS_BASE64_H_ +#define NSUTILS_BASE64_H_ + +#include <nsutils/errors.h> + +nserror base64_encode_alloc(const uint8_t *input, + size_t input_length, + uint8_t **output, + size_t *output_length); + +nserror base64_decode_alloc(const uint8_t *input, + size_t input_length, + uint8_t **output, + size_t *output_length); + +#endif |