blob: 2f52ac7453e9054359378e435544d6e158128161 [file] [log] [blame]
willy tarreau9e138862006-05-14 23:06:28 +02001/*
Willy Tarreau2dd0d472006-06-29 17:53:05 +02002 * include/common/base64.h
willy tarreau9e138862006-05-14 23:06:28 +02003 * Ascii to Base64 conversion as described in RFC1421.
Willy Tarreaubaaee002006-06-26 02:48:02 +02004 *
Willy Tarreauc01062b2010-10-07 19:27:29 +02005 * Copyright 2006-2010 Willy Tarreau <w@1wt.eu>
willy tarreau9e138862006-05-14 23:06:28 +02006 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 *
12 */
13
Willy Tarreau2dd0d472006-06-29 17:53:05 +020014#ifndef _COMMON_BASE64_H
15#define _COMMON_BASE64_H
willy tarreau9e138862006-05-14 23:06:28 +020016
Willy Tarreaue3ba5f02006-06-29 18:54:54 +020017#include <common/config.h>
18
willy tarreau9e138862006-05-14 23:06:28 +020019int a2base64(char *in, int ilen, char *out, int olen);
Krzysztof Piotr Oledzkifccbdc82010-01-29 13:36:23 +010020int base64dec(const char *in, size_t ilen, char *out, size_t olen);
Willy Tarreauc01062b2010-10-07 19:27:29 +020021const char *s30tob64(int in, char *out);
22int b64tos30(const char *in);
Krzysztof Piotr Oledzkifccbdc82010-01-29 13:36:23 +010023
Willy Tarreaubaaee002006-06-26 02:48:02 +020024extern const char base64tab[];
willy tarreau9e138862006-05-14 23:06:28 +020025
Willy Tarreau2dd0d472006-06-29 17:53:05 +020026#endif /* _COMMON_BASE64_H */