Fix compile error on big endian platform

pull/257/head
Tatsuhiro Tsujikawa 2014-07-14 21:32:48 +09:00
parent 04caefa406
commit 98681552fc
1 changed files with 1 additions and 2 deletions

View File

@ -37,7 +37,6 @@
#include "FatalException.h"
#include "util.h"
#include "crypto_endian.h"
namespace {
using namespace aria2;
@ -166,7 +165,7 @@ HMACResult PBKDF2(HMAC* hmac,
for (uint32_t counter = 1; key_length; ++counter) {
hmac->update(salt, salt_length);
const uint32_t c = crypto::__crypto_be(counter);
const uint32_t c = htonl(counter);
hmac->update((char*)&c, sizeof(c));
auto bytes = hmac->getResult().getBytes();