aboutsummaryrefslogtreecommitdiffstats
path: root/src/codec
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-11-10 20:14:38 +0000
committerlloyd <[email protected]>2008-11-10 20:14:38 +0000
commit9d529fb82a301f14b9cb0efb6c69c1fdb9c984e2 (patch)
treee9e6b69cfd6ef13e3554b638206d7faa1d6a55a3 /src/codec
parent148c4ecbd4116f9420229853b567cc17310b1cd1 (diff)
Have Algorithm_Factory::make_hash_function throw an exception if it can't
find an object to clone. Add a new constructor to Hash_Filter taking a HashFunction*
Diffstat (limited to 'src/codec')
-rw-r--r--src/codec/openpgp/info.txt1
-rw-r--r--src/codec/openpgp/openpgp.cpp5
2 files changed, 4 insertions, 2 deletions
diff --git a/src/codec/openpgp/info.txt b/src/codec/openpgp/info.txt
index 5ba418dbf..d43c72843 100644
--- a/src/codec/openpgp/info.txt
+++ b/src/codec/openpgp/info.txt
@@ -10,6 +10,7 @@ openpgp.h
</add>
<requires>
+crc24
base64
filters
</requires>
diff --git a/src/codec/openpgp/openpgp.cpp b/src/codec/openpgp/openpgp.cpp
index 2a84b037e..25eb15ec5 100644
--- a/src/codec/openpgp/openpgp.cpp
+++ b/src/codec/openpgp/openpgp.cpp
@@ -6,6 +6,7 @@
#include <botan/openpgp.h>
#include <botan/filters.h>
#include <botan/charset.h>
+#include <botan/crc24.h>
namespace Botan {
@@ -38,7 +39,7 @@ std::string encode(const byte input[], u32bit length,
Pipe pipe(new Fork(
new Base64_Encoder(true, PGP_WIDTH),
- new Chain(new Hash_Filter("CRC24"), new Base64_Encoder)
+ new Chain(new Hash_Filter(new CRC24), new Base64_Encoder)
)
);
@@ -133,7 +134,7 @@ SecureVector<byte> decode(DataSource& source, std::string& label,
Pipe base64(new Base64_Decoder,
new Fork(0,
- new Chain(new Hash_Filter("CRC24"),
+ new Chain(new Hash_Filter(new CRC24),
new Base64_Encoder)
)
);