PolarSSL v1.3.9
base64.h
Go to the documentation of this file.
1
27#ifndef POLARSSL_BASE64_H
28#define POLARSSL_BASE64_H
29
30#include <string.h>
31
32#define POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL -0x002A
33#define POLARSSL_ERR_BASE64_INVALID_CHARACTER -0x002C
35#ifdef __cplusplus
36extern "C" {
37#endif
38
54int base64_encode( unsigned char *dst, size_t *dlen,
55 const unsigned char *src, size_t slen );
56
73int base64_decode( unsigned char *dst, size_t *dlen,
74 const unsigned char *src, size_t slen );
75
81int base64_self_test( int verbose );
82
83#ifdef __cplusplus
84}
85#endif
86
87#endif /* base64.h */
int base64_self_test(int verbose)
Checkup routine.
int base64_encode(unsigned char *dst, size_t *dlen, const unsigned char *src, size_t slen)
Encode a buffer into base64 format.
int base64_decode(unsigned char *dst, size_t *dlen, const unsigned char *src, size_t slen)
Decode a base64-formatted buffer.