mirror of https://github.com/aria2/aria2
Fix compile error on big endian platform
parent
04caefa406
commit
98681552fc
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue