aboutsummaryrefslogtreecommitdiffstats
path: root/src/def_alg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/def_alg.cpp')
-rw-r--r--src/def_alg.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/def_alg.cpp b/src/def_alg.cpp
index 10c8e49d9..29e99d6a0 100644
--- a/src/def_alg.cpp
+++ b/src/def_alg.cpp
@@ -130,7 +130,6 @@ Default_Engine::find_block_cipher(const std::string& algo_spec) const
HANDLE_TYPE_NO_ARGS("GOST", GOST);
HANDLE_TYPE_NO_ARGS("IDEA", IDEA);
HANDLE_TYPE_NO_ARGS("KASUMI", KASUMI);
- HANDLE_TYPE_ONE_STRING("Luby-Rackoff", LubyRackoff);
HANDLE_TYPE_NO_ARGS("MARS", MARS);
HANDLE_TYPE_ONE_U32BIT("MISTY1", MISTY1, 8);
HANDLE_TYPE_NO_ARGS("Noekeon", Noekeon);
@@ -146,6 +145,13 @@ Default_Engine::find_block_cipher(const std::string& algo_spec) const
HANDLE_TYPE_NO_ARGS("Twofish", Twofish);
HANDLE_TYPE_NO_ARGS("XTEA", XTEA);
+ if(algo_name == "Luby-Rackoff" && name.size() >= 2)
+ {
+ HashFunction* hash = find_hash(name[1]);
+ if(hash)
+ return new LubyRackoff(hash);
+ }
+
if(algo_name == "Lion")
{
if(name.size() != 4)