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/threefish_512 | |
parent | bef5303b3ec1a17bc79ccce0eecdca4874639b56 (diff) |
Add message to BOTAN_ARG_CHECK and use it more widely
Diffstat (limited to 'src/lib/block/threefish_512')
-rw-r--r-- | src/lib/block/threefish_512/threefish_512.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/block/threefish_512/threefish_512.cpp b/src/lib/block/threefish_512/threefish_512.cpp index 0e6ba8889..7c368b409 100644 --- a/src/lib/block/threefish_512/threefish_512.cpp +++ b/src/lib/block/threefish_512/threefish_512.cpp @@ -239,8 +239,8 @@ void Threefish_512::decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) void Threefish_512::set_tweak(const uint8_t tweak[], size_t len) { - if(len != 16) - throw Exception("Threefish-512 requires 128 bit tweak"); + BOTAN_ARG_CHECK(len == 16, "Threefish-512 requires 128 bit tweak"); + m_T.resize(3); m_T[0] = load_le<uint64_t>(tweak, 0); m_T[1] = load_le<uint64_t>(tweak, 1); |