From 04319af23bf8ed467b17f9b74c814343e051ab6b Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Mon, 21 Sep 2015 14:59:01 -0400 Subject: Remove use of lookup.h in favor of new T::create API. --- src/lib/modes/cipher_mode.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/lib/modes/cipher_mode.cpp') diff --git a/src/lib/modes/cipher_mode.cpp b/src/lib/modes/cipher_mode.cpp index 262c41434..27ee26327 100644 --- a/src/lib/modes/cipher_mode.cpp +++ b/src/lib/modes/cipher_mode.cpp @@ -7,7 +7,6 @@ #include #include -#include #include #include @@ -34,7 +33,7 @@ namespace Botan { template Transform* make_ecb_mode(const Transform::Spec& spec) { - std::unique_ptr bc(get_block_cipher(spec.arg(0))); + std::unique_ptr bc(BlockCipher::create(spec.arg(0))); std::unique_ptr pad(get_bc_pad(spec.arg(1, "NoPadding"))); if(bc && pad) return new T(bc.release(), pad.release()); @@ -50,7 +49,7 @@ BOTAN_REGISTER_TRANSFORM(ECB_Decryption, make_ecb_mode); template Transform* make_cbc_mode(const Transform::Spec& spec) { - std::unique_ptr bc(get_block_cipher(spec.arg(0))); + std::unique_ptr bc(BlockCipher::create(spec.arg(0))); if(bc) { @@ -131,8 +130,8 @@ Cipher_Mode* get_cipher_mode(const std::string& algo_spec, Cipher_Dir direction) return cipher; } - if(StreamCipher* stream_cipher = get_stream_cipher(mode_name, provider)) - return new Stream_Cipher_Mode(stream_cipher); + if(auto sc = StreamCipher::create(mode_name, provider)) + return new Stream_Cipher_Mode(sc.release()); return nullptr; } -- cgit v1.2.3