summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-02-25 19:46:36 +0000
committerChristian Pointner <equinox@anytun.org>2008-02-25 19:46:36 +0000
commitae5bfc433a47c2aedb2486a117e1b424d258e479 (patch)
tree3bf0188e1aefc404250a8dbda1d5a120cc93b31a
parentfixed resize issue with buffer->xPacket (diff)
added quick and dirty hack which remedies the cipher CTR error issues
-rw-r--r--cipher.cpp2
1 files changed, 2 insertions, 0 deletions
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)