From ae5bfc433a47c2aedb2486a117e1b424d258e479 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 25 Feb 2008 19:46:36 +0000 Subject: added quick and dirty hack which remedies the cipher CTR error issues --- cipher.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cipher.cpp b/cipher.cpp index 579d96c..3a7344e 100644 --- a/cipher.cpp +++ b/cipher.cpp @@ -100,6 +100,8 @@ void AesIcmCipher::setKey(Buffer key) void AesIcmCipher::setSalt(Buffer salt) { salt_ = salt; + if(!salt_[u_int32_t(0)]) + salt_[u_int32_t(0)] = 1; // TODO: this is a outstandingly ugly workaround } u_int32_t AesIcmCipher::cipher(u_int8_t* in, u_int32_t ilen, u_int8_t* out, u_int32_t olen, seq_nr_t seq_nr, sender_id_t sender_id) -- cgit v1.2.3