aboutsummaryrefslogtreecommitdiffstats
path: root/src/stream/stream_cipher.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream/stream_cipher.h')
-rw-r--r--src/stream/stream_cipher.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/stream/stream_cipher.h b/src/stream/stream_cipher.h
index cb6fb3481..edeb1aff5 100644
--- a/src/stream/stream_cipher.h
+++ b/src/stream/stream_cipher.h
@@ -1,4 +1,4 @@
-/**
+/*
* Stream Cipher
* (C) 1999-2007 Jack Lloyd
*
@@ -12,8 +12,8 @@
namespace Botan {
-/*
-* Stream Cipher
+/**
+* Base class for all stream ciphers
*/
class BOTAN_DLL StreamCipher : public SymmetricAlgorithm
{
@@ -39,19 +39,13 @@ class BOTAN_DLL StreamCipher : public SymmetricAlgorithm
* @param iv the initialization vector
* @param iv_len the length of the IV in bytes
*/
- virtual void set_iv(const byte[], u32bit iv_len)
- {
- if(iv_len)
- throw Invalid_Argument("The stream cipher " + name() +
- " does not support resyncronization");
- }
+ virtual void set_iv(const byte iv[], u32bit iv_len);
/**
* @param iv_len the length of the IV in bytes
* @return if the length is valid for this algorithm
*/
- virtual bool valid_iv_length(u32bit iv_len) const
- { return (iv_len == 0); }
+ virtual bool valid_iv_length(u32bit iv_len) const;
/**
* Get a new object representing the same algorithm as *this
@@ -65,6 +59,9 @@ class BOTAN_DLL StreamCipher : public SymmetricAlgorithm
/**
* StreamCipher constructor
+ * @param key_min the minimum key size
+ * @param key_max the maximum key size
+ * @param key_mod the modulo restriction on the key size
*/
StreamCipher(u32bit key_min,
u32bit key_max = 0,