diff options
author | Jack Lloyd <[email protected]> | 2018-05-13 12:49:40 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-05-13 12:49:40 -0400 |
commit | 1fcf8c6ba3f8912c9c6cba0555597ab0083eaaa2 (patch) | |
tree | 07199fd3b677dd02828f73fa1d2dcda272ee7a1f /src/lib/block/aes | |
parent | bef5303b3ec1a17bc79ccce0eecdca4874639b56 (diff) |
Add message to BOTAN_ARG_CHECK and use it more widely
Diffstat (limited to 'src/lib/block/aes')
-rw-r--r-- | src/lib/block/aes/aes.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/block/aes/aes.cpp b/src/lib/block/aes/aes.cpp index c35bdabaa..403945cc9 100644 --- a/src/lib/block/aes/aes.cpp +++ b/src/lib/block/aes/aes.cpp @@ -337,8 +337,7 @@ void aes_key_schedule(const uint8_t key[], size_t length, const size_t X = length / 4; // Can't happen, but make static analyzers happy - if(X != 4 && X != 6 && X != 8) - throw Invalid_Argument("Invalid AES key size"); + BOTAN_ARG_CHECK(X == 4 || X == 6 || X == 8, "Invalid AES key size"); for(size_t i = 0; i != X; ++i) XEK[i] = load_be<uint32_t>(key, i); |