From 59fed0e232008a3ff42a70d0f3ecbe0b65104c76 Mon Sep 17 00:00:00 2001 From: lloyd Date: Wed, 16 Jun 2010 03:22:08 +0000 Subject: Move a couple of StreamCipher functions to a source file to avoid the Doxygen vs GCC problem. --- src/stream/stream_cipher.cpp | 24 ++++++++++++++++++++++++ src/stream/stream_cipher.h | 10 ++-------- 2 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 src/stream/stream_cipher.cpp diff --git a/src/stream/stream_cipher.cpp b/src/stream/stream_cipher.cpp new file mode 100644 index 000000000..9ae548a9e --- /dev/null +++ b/src/stream/stream_cipher.cpp @@ -0,0 +1,24 @@ +/* +* Stream Cipher +* (C) 1999-2010 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ + +#include + +namespace Botan { + +void StreamCipher::set_iv(const byte[], u32bit iv_len) + { + if(iv_len) + throw Invalid_Argument("The stream cipher " + name() + + " does not support resyncronization"); + } + +bool StreamCipher::valid_iv_length(u32bit iv_len) const + { + return (iv_len == 0); + } + +} diff --git a/src/stream/stream_cipher.h b/src/stream/stream_cipher.h index 4ce5cb1a4..580fa85e2 100644 --- a/src/stream/stream_cipher.h +++ b/src/stream/stream_cipher.h @@ -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 iv[], 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 -- cgit v1.2.3