aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/stream/chacha/chacha.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/stream/chacha/chacha.cpp')
-rw-r--r--src/lib/stream/chacha/chacha.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/stream/chacha/chacha.cpp b/src/lib/stream/chacha/chacha.cpp
index 52e5eaaf4..0f1e082cf 100644
--- a/src/lib/stream/chacha/chacha.cpp
+++ b/src/lib/stream/chacha/chacha.cpp
@@ -222,10 +222,7 @@ std::string ChaCha::name() const
void ChaCha::seek(uint64_t offset)
{
- if (m_state.size() == 0 && m_buffer.size() == 0)
- {
- throw Invalid_State("You have to setup the stream cipher (key and iv)");
- }
+ verify_key_set(m_state.empty() == false);
// Find the block offset
uint64_t counter = offset / 64;