diff options
Diffstat (limited to 'src/lib/stream/rc4/rc4.cpp')
-rw-r--r-- | src/lib/stream/rc4/rc4.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/lib/stream/rc4/rc4.cpp b/src/lib/stream/rc4/rc4.cpp index e5ea2e2b8..47dc1ce29 100644 --- a/src/lib/stream/rc4/rc4.cpp +++ b/src/lib/stream/rc4/rc4.cpp @@ -10,15 +10,6 @@ namespace Botan { -RC4* RC4::make(const Spec& spec) - { - if(spec.algo_name() == "RC4") - return new RC4(spec.arg_as_integer(0, 0)); - if(spec.algo_name() == "RC4_drop") - return new RC4(768); - return nullptr; - } - /* * Combine cipher stream with message */ @@ -36,9 +27,10 @@ void RC4::cipher(const byte in[], byte out[], size_t length) m_position += length; } -void RC4::set_iv(const byte*, size_t) +void RC4::set_iv(const byte*, size_t length) { - throw Exception("RC4 does not support an IV"); + if(length > 0) + throw Exception("RC4 does not support an IV"); } /* |