|
Packit |
762fc5 |
/*
|
|
Packit |
762fc5 |
**
|
|
Packit |
762fc5 |
** Copyright (C) 1994 Swedish University Network (SUNET)
|
|
Packit |
762fc5 |
** Modified by Rami Lehti (C) 1999
|
|
Packit |
762fc5 |
** $Header$
|
|
Packit |
762fc5 |
**
|
|
Packit |
762fc5 |
**
|
|
Packit |
762fc5 |
** This program is free software; you can redistribute it and/or modify
|
|
Packit |
762fc5 |
** it under the terms of the GNU General Public License as published by
|
|
Packit |
762fc5 |
** the Free Software Foundation; either version 2 of the License, or
|
|
Packit |
762fc5 |
** (at your option) any later version.
|
|
Packit |
762fc5 |
**
|
|
Packit |
762fc5 |
** This program is distributed in the hope that it will be useful,
|
|
Packit |
762fc5 |
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
762fc5 |
** MERCHANTABILITY or FITTNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit |
762fc5 |
** GNU General Public License for more details.
|
|
Packit |
762fc5 |
**
|
|
Packit |
762fc5 |
** You should have received a copy of the GNU General Public License
|
|
Packit |
762fc5 |
** along with this program; if not, write to the Free Software
|
|
Packit |
762fc5 |
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
Packit |
762fc5 |
**
|
|
Packit |
762fc5 |
**
|
|
Packit |
762fc5 |
** Martin.Wendel@udac.uu.se
|
|
Packit |
762fc5 |
** Torbjorn.Wictorin@udac.uu.se
|
|
Packit |
762fc5 |
**
|
|
Packit |
762fc5 |
** UDAC
|
|
Packit |
762fc5 |
** P.O. Box 174
|
|
Packit |
762fc5 |
** S-751 04 Uppsala
|
|
Packit |
762fc5 |
** Sweden
|
|
Packit |
762fc5 |
**
|
|
Packit |
762fc5 |
*/
|
|
Packit |
762fc5 |
|
|
Packit |
762fc5 |
#ifndef _BASE64_H_INCLUDED
|
|
Packit |
762fc5 |
#define _BASE64_H_INCLUDED
|
|
Packit |
762fc5 |
#include <sys/types.h>
|
|
Packit |
762fc5 |
#include <assert.h>
|
|
Packit |
762fc5 |
#include "types.h"
|
|
Packit |
762fc5 |
|
|
Packit |
762fc5 |
#define B64_BUF 16384
|
|
Packit |
762fc5 |
#define FAIL -1
|
|
Packit |
762fc5 |
#define SKIP -2
|
|
Packit |
762fc5 |
|
|
Packit |
762fc5 |
|
|
Packit |
762fc5 |
char* encode_base64(byte* src,size_t ssize);
|
|
Packit |
762fc5 |
|
|
Packit |
762fc5 |
byte* decode_base64(char* src,size_t ssize,size_t *);
|
|
Packit |
762fc5 |
|
|
Packit |
762fc5 |
/* Returns decoded length */
|
|
Packit |
762fc5 |
size_t length_base64(char* src,size_t ssize);
|
|
Packit |
762fc5 |
|
|
Packit |
762fc5 |
#endif /* _BASE64_H_INCLUDED */
|