aboutsummaryrefslogtreecommitdiffstats
path: root/common/rdr/AESOutStream.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/rdr/AESOutStream.cxx')
-rw-r--r--common/rdr/AESOutStream.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/rdr/AESOutStream.cxx b/common/rdr/AESOutStream.cxx
index fcb3e37a..1ec38b56 100644
--- a/common/rdr/AESOutStream.cxx
+++ b/common/rdr/AESOutStream.cxx
@@ -21,7 +21,9 @@
#endif
#include <assert.h>
-#include <rdr/Exception.h>
+
+#include <stdexcept>
+
#include <rdr/AESOutStream.h>
#ifdef HAVE_NETTLE
@@ -39,7 +41,7 @@ AESOutStream::AESOutStream(OutStream* _out, const uint8_t* key,
else if (keySize == 256)
EAX_SET_KEY(&eaxCtx256, aes256_set_encrypt_key, aes256_encrypt, key);
else
- assert(!"incorrect key size");
+ throw std::out_of_range("Incorrect key size");
}
AESOutStream::~AESOutStream()