summaryrefslogtreecommitdiff
path: root/include/nsutils/base64.h
blob: 139a1b6feb810552252179f34b73771b9ec18def (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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