Botan 1.10.17

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 }
Botan::StreamCipher::set_iv
virtual void set_iv(const byte iv[], size_t iv_len)
Definition: stream_cipher.cpp:12
Botan::StreamCipher::valid_iv_length
virtual bool valid_iv_length(size_t iv_len) const
Definition: stream_cipher.cpp:19
Botan::Invalid_Argument
std::invalid_argument Invalid_Argument
Definition: exceptn.h:20
Botan::byte
unsigned char byte
Definition: types.h:22
Botan
Definition: algo_base.h:14
Botan::Algorithm::name
virtual std::string name() const =0