8 #ifndef BASE64_DECODE_H 9 #define BASE64_DECODE_H 28 : _buffersize(buffersize_in)
38 int decode(
const char* code_in,
const int length_in,
char* plaintext_out)
43 void decode(std::istream& istream_in, std::ostream& ostream_in)
47 const int N = _buffersize;
48 char* code =
new char[N];
49 char* plaintext =
new char[N];
55 istream_in.read((
char*)code, N);
56 codelength = istream_in.gcount();
57 plainlength = decode(code, codelength, plaintext);
58 ostream_in.write((
const char*)plaintext, plainlength);
60 while (istream_in.good() && codelength > 0);
73 #endif // BASE64_DECODE_H int decode(char value_in)
int base64_decode_block(const char *code_in, const int length_in, char *plaintext_out, base64_decodestate *state_in)
void base64_init_decodestate(base64_decodestate *state_in)
decoder(int buffersize_in=512)
base64_decodestate _state
int decode(const char *code_in, const int length_in, char *plaintext_out)
int base64_decode_value(char value_in)
void decode(std::istream &istream_in, std::ostream &ostream_in)