aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/modes/aead
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2015-09-21 14:59:01 -0400
committerJack Lloyd <[email protected]>2015-09-21 14:59:01 -0400
commit04319af23bf8ed467b17f9b74c814343e051ab6b (patch)
tree630d1a0cc931e77e7e1f07319e5cf89d00af4458 /src/lib/modes/aead
parent408ea0a9b8ed0f575f8ee26891473920b42ef026 (diff)
Remove use of lookup.h in favor of new T::create API.
Diffstat (limited to 'src/lib/modes/aead')
-rw-r--r--src/lib/modes/aead/aead.cpp1
-rw-r--r--src/lib/modes/aead/chacha20poly1305/chacha20poly1305.cpp9
2 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/modes/aead/aead.cpp b/src/lib/modes/aead/aead.cpp
index 1e66dbd43..61918c310 100644
--- a/src/lib/modes/aead/aead.cpp
+++ b/src/lib/modes/aead/aead.cpp
@@ -6,7 +6,6 @@
#include <botan/internal/mode_utils.h>
#include <botan/aead.h>
-#include <botan/lookup.h>
#if defined(BOTAN_HAS_AEAD_CCM)
#include <botan/ccm.h>
diff --git a/src/lib/modes/aead/chacha20poly1305/chacha20poly1305.cpp b/src/lib/modes/aead/chacha20poly1305/chacha20poly1305.cpp
index 329e2e713..0aef6a747 100644
--- a/src/lib/modes/aead/chacha20poly1305/chacha20poly1305.cpp
+++ b/src/lib/modes/aead/chacha20poly1305/chacha20poly1305.cpp
@@ -11,9 +11,12 @@
namespace Botan {
ChaCha20Poly1305_Mode::ChaCha20Poly1305_Mode() :
- m_chacha(make_stream_cipher("ChaCha")),
- m_poly1305(make_message_auth("Poly1305"))
- {}
+ m_chacha(StreamCipher::create("ChaCha")),
+ m_poly1305(MessageAuthenticationCode::create("Poly1305"))
+ {
+ if(!m_chacha || !m_poly1305)
+ throw Algorithm_Not_Found("ChaCha20Poly1305");
+ }
bool ChaCha20Poly1305_Mode::valid_nonce_length(size_t n) const
{