diff options
-rw-r--r-- | src/lib/modes/aead/chacha20poly1305/chacha20poly1305.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/modes/aead/chacha20poly1305/chacha20poly1305.cpp b/src/lib/modes/aead/chacha20poly1305/chacha20poly1305.cpp index a278156eb..15fd8f959 100644 --- a/src/lib/modes/aead/chacha20poly1305/chacha20poly1305.cpp +++ b/src/lib/modes/aead/chacha20poly1305/chacha20poly1305.cpp @@ -7,8 +7,6 @@ #include <botan/internal/mode_utils.h> #include <botan/chacha20poly1305.h> -#include <botan/chacha.h> -#include <botan/poly1305.h> namespace Botan { @@ -31,7 +29,7 @@ void ChaCha20Poly1305_Mode::clear() void ChaCha20Poly1305_Mode::key_schedule(const byte key[], size_t length) { if(!m_chacha.get()) - m_chacha.reset(new ChaCha); + m_chacha.reset(make_a<StreamCipher>("ChaCha")); m_chacha->set_key(key, length); } @@ -63,7 +61,7 @@ secure_vector<byte> ChaCha20Poly1305_Mode::start_raw(const byte nonce[], size_t m_chacha->encrypt(zeros); if(!m_poly1305.get()) - m_poly1305.reset(new Poly1305); + m_poly1305.reset(make_a<MessageAuthenticationCode>("Poly1305")); m_poly1305->set_key(&zeros[0], 32); // Remainder of output is discard |