summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)