aboutsummaryrefslogtreecommitdiffstats
path: root/src/codec/hex/hex.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-11-03 23:41:56 +0000
committerlloyd <[email protected]>2009-11-03 23:41:56 +0000
commit30f6169ebf9164a6fdb35519030975440a5b07d7 (patch)
tree8435e826dd692066c6c3fc56d02f8f4479188c02 /src/codec/hex/hex.cpp
parentcb0d4a18f2fc77a40f6055fedb43b78606068b7b (diff)
parent226d96ee4e64994beb9ec9436a29ac6656d61924 (diff)
propagate from branch 'net.randombit.botan.1_8' (head 6e8c18515725a70923b34118951252723dd4c29a)
to branch 'net.randombit.botan' (head 77ba4ea5a4be36d6d029bcc852b2271edff0d679)
Diffstat (limited to 'src/codec/hex/hex.cpp')
-rw-r--r--src/codec/hex/hex.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/codec/hex/hex.cpp b/src/codec/hex/hex.cpp
index fbacc278b..201c9bfdf 100644
--- a/src/codec/hex/hex.cpp
+++ b/src/codec/hex/hex.cpp
@@ -13,13 +13,15 @@
namespace Botan {
+const u32bit HEX_CODEC_BUFFER_SIZE = 256;
+
/*
* Hex_Encoder Constructor
*/
Hex_Encoder::Hex_Encoder(bool breaks, u32bit length, Case c) :
casing(c), line_length(breaks ? length : 0)
{
- in.create(64);
+ in.create(HEX_CODEC_BUFFER_SIZE);
out.create(2*in.size());
counter = position = 0;
}
@@ -29,7 +31,7 @@ Hex_Encoder::Hex_Encoder(bool breaks, u32bit length, Case c) :
*/
Hex_Encoder::Hex_Encoder(Case c) : casing(c), line_length(0)
{
- in.create(64);
+ in.create(HEX_CODEC_BUFFER_SIZE);
out.create(2*in.size());
counter = position = 0;
}
@@ -114,7 +116,7 @@ void Hex_Encoder::end_msg()
*/
Hex_Decoder::Hex_Decoder(Decoder_Checking c) : checking(c)
{
- in.create(64);
+ in.create(HEX_CODEC_BUFFER_SIZE);
out.create(in.size() / 2);
position = 0;
}