]> diplodocus.org Git - nmh/blob - sbr/base64.h
Fix invalid pointer arithmetic.
[nmh] / sbr / base64.h
1 /* base64.h -- routines for converting to base64
2 *
3 * This code is Copyright (c) 2017, by the authors of nmh. See the
4 * COPYRIGHT file in the root directory of the nmh distribution for
5 * complete copyright information.
6 */
7
8 int writeBase64aux(FILE *, FILE *, int);
9 int writeBase64(const unsigned char *, size_t, unsigned char *);
10 int writeBase64raw(const unsigned char *, size_t, unsigned char *);
11 int decodeBase64(const char *, unsigned char **, size_t *, int, unsigned char *);
12 void hexify(const unsigned char *, size_t, char **);
13
14 /* Includes trailing NUL. */
15 #define BASE64SIZE(x) ((((x + 2) / 3) * 4) + 1)