diff options
author | Christian Pointner <equinox@anytun.org> | 2009-01-16 22:59:45 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2009-01-16 22:59:45 +0000 |
commit | c658d303e580849fa77f669c4ece78bfc0ddd74b (patch) | |
tree | 68e782c47915ce37fa83db9c4e879f271c5dc0b8 /src/cipher.cpp | |
parent | added Log to stdout (diff) |
got rid of NOPACKED (struct alignment works now under Windows)
crypto works now under windows using openssl crypto
Diffstat (limited to 'src/cipher.cpp')
-rw-r--r-- | src/cipher.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cipher.cpp b/src/cipher.cpp index 69686bb..3dc2314 100644 --- a/src/cipher.cpp +++ b/src/cipher.cpp @@ -131,8 +131,8 @@ void AesIcmCipher::calcCtr(KeyDerivation& kd, seq_nr_t seq_nr, sender_id_t sende kd.generate(dir_, LABEL_SATP_SALT, seq_nr, salt_); #ifdef ANYTUN_02_COMPAT - if(!salt_[int32_t(0)]) - salt_[int32_t(0)] = 1; + if(!salt_[u_int32_t(0)]) + salt_[u_int32_t(0)] = 1; #endif std::memcpy(ctr_.salt_.buf_, salt_.getBuf(), SALT_LENGTH); @@ -185,7 +185,7 @@ void AesIcmCipher::calc(KeyDerivation& kd, u_int8_t* in, u_int32_t ilen, u_int8_ cLog.msg(Log::PRIO_ERR) << "AesIcmCipher: Failed to set cipher CTR: size don't fits"; return; } - u_int32_t num = 0; + unsigned int num = 0; std::memset(ecount_buf_, 0, AES_BLOCK_SIZE); AES_ctr128_encrypt(in, out, (ilen < olen) ? ilen : olen, &aes_key_, ctr_.buf_, ecount_buf_, &num); #endif |