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