diff options
Diffstat (limited to 'src/tests/test_aead.cpp')
-rw-r--r-- | src/tests/test_aead.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tests/test_aead.cpp b/src/tests/test_aead.cpp index 8b46e9177..f716c0554 100644 --- a/src/tests/test_aead.cpp +++ b/src/tests/test_aead.cpp @@ -24,6 +24,9 @@ size_t aead_test(const std::string& algo, std::unique_ptr<Cipher_Mode> enc(get_aead(algo, ENCRYPTION)); std::unique_ptr<Cipher_Mode> dec(get_aead(algo, DECRYPTION)); + if(!enc || !dec) + throw std::runtime_error("Unknown AEAD " + algo); + enc->set_key(key); dec->set_key(key); |