diff options
author | lloyd <[email protected]> | 2010-06-28 20:01:52 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-06-28 20:01:52 +0000 |
commit | e25bbc9b8ff24931b34507a10fe08fe3dd592b17 (patch) | |
tree | 145a57c9833d35f7c7fea172d9f3fe0e9368b5d0 /src | |
parent | 7c3301887040d935bc8a4413f52f4349c550b551 (diff) |
If the Keyed_Filter's set_iv is called (ie, in the case that the1.9.9
filter doesn't support IVs at all), throw an exception unless the IV
has zero length.
Diffstat (limited to 'src')
-rw-r--r-- | src/filters/basefilt.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/filters/basefilt.cpp b/src/filters/basefilt.cpp index 008d04b02..dfb81386b 100644 --- a/src/filters/basefilt.cpp +++ b/src/filters/basefilt.cpp @@ -10,9 +10,10 @@ namespace Botan { -void Keyed_Filter::set_iv(const InitializationVector&) +void Keyed_Filter::set_iv(const InitializationVector& iv) { - // assert that the iv is empty? + if(iv.length() != 0) + throw Invalid_IV_Length(name(), iv.length()); } /* |