aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-08-13 10:22:48 +0000
committerlloyd <[email protected]>2006-08-13 10:22:48 +0000
commit0eba037c3068bbe648a0475a03e92e8c65209091 (patch)
tree0aa32c71eeb7ecb0bc3d8847c352365b321e78e7
parent195e84b9fd4da48339e39d655400499e9c7009e4 (diff)
Throw Invalid_Key_Length rather than Invalid_Argument in AES constructor
if a bad key value is selected.
-rw-r--r--src/aes.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/aes.cpp b/src/aes.cpp
index 778c4154e..0fe8421a5 100644
--- a/src/aes.cpp
+++ b/src/aes.cpp
@@ -5,7 +5,6 @@
#include <botan/aes.h>
#include <botan/bit_ops.h>
-#include <botan/parsing.h>
namespace Botan {
@@ -177,7 +176,7 @@ u32bit AES::S(u32bit input)
AES::AES(u32bit key_size) : BlockCipher(16, key_size)
{
if(key_size != 16 && key_size != 24 && key_size != 32)
- throw Invalid_Argument("AES: Bad key size " + to_string(key_size));
+ throw Invalid_Key_Length(name(), key_size);
ROUNDS = (key_size / 4) + 6;
}