aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/modes/cipher_mode.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-12-04 15:59:52 -0500
committerJack Lloyd <[email protected]>2016-12-04 15:59:52 -0500
commitd44c00a0d311d9295653b1a7bffbc679967631f1 (patch)
treee4496204111a27dba1ac3cd5093bd8874efb1aa9 /src/lib/modes/cipher_mode.cpp
parenta681421d01ea132ea3461f99641daacd9bd64df9 (diff)
Remove ECB mode
Not a good thing to offer at this level. If you know what you are doing for the strange special case where it is necessary, the raw BlockCipher interface is available and probably more convenient.
Diffstat (limited to 'src/lib/modes/cipher_mode.cpp')
-rw-r--r--src/lib/modes/cipher_mode.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/lib/modes/cipher_mode.cpp b/src/lib/modes/cipher_mode.cpp
index d622e7754..843e49581 100644
--- a/src/lib/modes/cipher_mode.cpp
+++ b/src/lib/modes/cipher_mode.cpp
@@ -18,10 +18,6 @@
#include <botan/aead.h>
#endif
-#if defined(BOTAN_HAS_MODE_ECB)
- #include <botan/ecb.h>
-#endif
-
#if defined(BOTAN_HAS_MODE_CBC)
#include <botan/cbc.h>
#endif
@@ -140,20 +136,6 @@ Cipher_Mode* get_cipher_mode(const std::string& algo, Cipher_Dir direction)
}
#endif
-#if defined(BOTAN_HAS_MODE_ECB)
- if(spec.algo_name() == "ECB")
- {
- std::unique_ptr<BlockCipherModePaddingMethod> pad(get_bc_pad(spec.arg(1, "NoPadding")));
- if(pad)
- {
- if(direction == ENCRYPTION)
- return new ECB_Encryption(bc.release(), pad.release());
- else
- return new ECB_Decryption(bc.release(), pad.release());
- }
- }
-#endif
-
#endif
return nullptr;