aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorlloyd <[email protected]>2013-03-14 19:07:38 +0000
committerlloyd <[email protected]>2013-03-14 19:07:38 +0000
commit3d4daa8f11c1ba664a2854d0c372bef4cbd54e19 (patch)
treee6f4049b8d1bf958c752c05ae061eb634e0af738 /src/engine
parent261a665b1be34f07d5012eed5f6090fd85dd8479 (diff)
OCB decryption
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/core_engine/core_modes.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/engine/core_engine/core_modes.cpp b/src/engine/core_engine/core_modes.cpp
index 039a60c78..08124a3a0 100644
--- a/src/engine/core_engine/core_modes.cpp
+++ b/src/engine/core_engine/core_modes.cpp
@@ -136,10 +136,8 @@ Keyed_Filter* get_cipher_mode(const BlockCipher* block_cipher,
{
if(direction == ENCRYPTION)
return new OCB_Encryption(block_cipher->clone(), 16);
- /*
else
return new OCB_Decryption(block_cipher->clone(), 16);
- */
}
#endif
@@ -237,7 +235,10 @@ Keyed_Filter* Core_Engine::get_cipher(const std::string& algo_spec,
if(filt)
return filt;
- throw Algorithm_Not_Found(cipher_name + "/" + mode + "/" + padding);
+ if(padding != "NoPadding")
+ throw Algorithm_Not_Found(cipher_name + "/" + mode + "/" + padding);
+ else
+ throw Algorithm_Not_Found(cipher_name + "/" + mode);
}
}