Botan  1.10.9
stream_cipher.cpp
Go to the documentation of this file.
1 /*
2 * Stream Cipher
3 * (C) 1999-2010 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7 
8 #include <botan/stream_cipher.h>
9 
10 namespace Botan {
11 
12 void StreamCipher::set_iv(const byte[], size_t iv_len)
13  {
14  if(iv_len)
15  throw Invalid_Argument("The stream cipher " + name() +
16  " does not support resyncronization");
17  }
18 
19 bool StreamCipher::valid_iv_length(size_t iv_len) const
20  {
21  return (iv_len == 0);
22  }
23 
24 }
virtual void set_iv(const byte iv[], size_t iv_len)
std::invalid_argument Invalid_Argument
Definition: exceptn.h:20
unsigned char byte
Definition: types.h:22
virtual bool valid_iv_length(size_t iv_len) const
virtual std::string name() const =0