aboutsummaryrefslogtreecommitdiffstats
path: root/src/stream/turing/turing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream/turing/turing.cpp')
-rw-r--r--src/stream/turing/turing.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/stream/turing/turing.cpp b/src/stream/turing/turing.cpp
index 1e2203480..8336a70a7 100644
--- a/src/stream/turing/turing.cpp
+++ b/src/stream/turing/turing.cpp
@@ -257,15 +257,15 @@ void Turing::key_schedule(const byte key[], u32bit length)
S3[i] = (W3 & 0xFFFFFF00) | C3;
}
- resync(0, 0);
+ set_iv(0, 0);
}
/*
* Resynchronization
*/
-void Turing::resync(const byte iv[], u32bit length)
+void Turing::set_iv(const byte iv[], u32bit length)
{
- if(length % 4 != 0 || length > 16)
+ if(!valid_iv_length(length))
throw Invalid_IV_Length(name(), length);
SecureVector<u32bit> IV(length / 4);