base64.h
899 Bytes
#ifndef __BASE64_H__
#define __BASE64_H__
#include "cipher.h"
struct buffer_st;
struct buffer_st *buffer_init();
void buffer_reset (struct buffer_st *b, size_t size);
void buffer_delete (struct buffer_st *b);
int b64_StreamEncode (struct buffer_st *b, const unsigned char *source, size_t length, unsigned char *target, size_t * target_size, bool finalize);
int b64_StreamDecode (struct buffer_st *b, const unsigned char *source, size_t length, unsigned char *target, size_t * target_size, bool finalize);
extern "C" int CIPHER_API b64_init(void * input, size_t in_size, void * output, size_t * out_size);
extern "C" void CIPHER_API b64_del_buffer(void * handle);
extern "C" int CIPHER_API b64_encode(const void * input, size_t in_size, void * output, size_t * out_size);
extern "C" int CIPHER_API b64_decode(const void * input, size_t in_size, void * output, size_t * out_size);
#endif