aboutsummaryrefslogtreecommitdiffstats
path: root/src/block
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-01-05 23:06:31 +0000
committerlloyd <[email protected]>2010-01-05 23:06:31 +0000
commit2837e915d82e439730624f15bfc8c820475c9d65 (patch)
treeaeb1ec26572fb29c1bd60baab582699279201d71 /src/block
parent968a4250218d40f3da9eee8ff50432a3169605c6 (diff)
Clean up exceptions. Remove some unused ones like Config_Error. Make
Invalid_Argument just a typedef for std::invalid_argument. Make Botan::Exception a typedef for std::runtime_error. Make Memory_Exhaustion a public exception, and use it in other places where memory allocations can fail.
Diffstat (limited to 'src/block')
-rw-r--r--src/block/lion/lion.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/block/lion/lion.cpp b/src/block/lion/lion.cpp
index e590a78ce..d8dfd1fcb 100644
--- a/src/block/lion/lion.cpp
+++ b/src/block/lion/lion.cpp
@@ -116,8 +116,9 @@ Lion::Lion(HashFunction* hash_in, StreamCipher* sc_in, u32bit block_len) :
{
if(2*LEFT_SIZE + 1 > BLOCK_SIZE)
throw Invalid_Argument(name() + ": Chosen block size is too small");
+
if(!cipher->valid_keylength(LEFT_SIZE))
- throw Exception(name() + ": This stream/hash combination is invalid");
+ throw Invalid_Argument(name() + ": This stream/hash combo is invalid");
key1.resize(LEFT_SIZE);
key2.resize(LEFT_SIZE);