diff options
author | lloyd <[email protected]> | 2008-11-10 20:14:38 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-10 20:14:38 +0000 |
commit | 9d529fb82a301f14b9cb0efb6c69c1fdb9c984e2 (patch) | |
tree | e9e6b69cfd6ef13e3554b638206d7faa1d6a55a3 /src/libstate/algo_factory.cpp | |
parent | 148c4ecbd4116f9420229853b567cc17310b1cd1 (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/libstate/algo_factory.cpp')
-rw-r--r-- | src/libstate/algo_factory.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstate/algo_factory.cpp b/src/libstate/algo_factory.cpp index c7f10a68a..cbb3c8faa 100644 --- a/src/libstate/algo_factory.cpp +++ b/src/libstate/algo_factory.cpp @@ -6,6 +6,7 @@ Algorithm Factory #include <botan/libstate.h> #include <botan/stl_util.h> #include <botan/engine.h> +#include <botan/exceptn.h> #include <algorithm> namespace Botan { @@ -66,7 +67,8 @@ HashFunction* Algorithm_Factory::make_hash_function(const SCAN_Name& request) const HashFunction* prototype = prototype_hash_function(request); if(prototype) return prototype->clone(); - return 0; + + throw Algorithm_Not_Found(request.as_string()); } } |