aboutsummaryrefslogtreecommitdiffstats
path: root/include/base64.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2007-01-20 10:35:26 +0000
committerlloyd <[email protected]>2007-01-20 10:35:26 +0000
commit49922890c906296caf31ad6fa750d197b0d8db5c (patch)
tree47ba6de98bf5ab483c788ab3d5dafec8616ed707 /include/base64.h
parent3daea9be0a02b89703a37761bad293933891d999 (diff)
Add a new parameter to the Base64_Encoder to specify that a trailing
newline should always be added, even if the output would normally fit entirely on the current line. Monotone needs this for compatability with the Crypto++ implementation of base64.
Diffstat (limited to 'include/base64.h')
-rw-r--r--include/base64.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/base64.h b/include/base64.h
index bd3921ab8..ec144dc63 100644
--- a/include/base64.h
+++ b/include/base64.h
@@ -21,13 +21,14 @@ class Base64_Encoder : public Filter
void write(const byte[], u32bit);
void end_msg();
- Base64_Encoder(bool = false, u32bit = 72);
+ Base64_Encoder(bool = false, u32bit = 72, bool = false);
private:
void encode_and_send(const byte[], u32bit);
void do_output(const byte[], u32bit);
static const byte BIN_TO_BASE64[64];
const u32bit line_length;
+ const bool trailing_newline;
SecureVector<byte> in, out;
u32bit position, counter;
};