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
10namespace Botan {
11
12void 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
19bool StreamCipher::valid_iv_length(size_t iv_len) const
20 {
21 return (iv_len == 0);
22 }
23
24}
virtual std::string name() const =0
virtual void set_iv(const byte iv[], size_t iv_len)
virtual bool valid_iv_length(size_t iv_len) const
std::invalid_argument Invalid_Argument
Definition exceptn.h:20