diff options
Diffstat (limited to 'src/lib/stream/rc4/rc4.cpp')
-rw-r--r-- | src/lib/stream/rc4/rc4.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/stream/rc4/rc4.cpp b/src/lib/stream/rc4/rc4.cpp index 208b2f560..60565d445 100644 --- a/src/lib/stream/rc4/rc4.cpp +++ b/src/lib/stream/rc4/rc4.cpp @@ -15,6 +15,8 @@ namespace Botan { */ void RC4::cipher(const uint8_t in[], uint8_t out[], size_t length) { + verify_key_set(m_state.empty() == false); + while(length >= m_buffer.size() - m_position) { xor_buf(out, in, &m_buffer[m_position], m_buffer.size() - m_position); |