mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 19:57:48 +02:00
fix compilation on arm64
This commit is contained in:
parent
6f91e3988c
commit
f588af834d
3 changed files with 17 additions and 21 deletions
|
@ -631,10 +631,6 @@ namespace crypto
|
|||
static const uint64_t ipads[] = { IPAD, IPAD, IPAD, IPAD };
|
||||
static const uint64_t opads[] = { OPAD, OPAD, OPAD, OPAD };
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
#pragma GCC push_options
|
||||
#pragma GCC target("avx")
|
||||
#endif
|
||||
void HMACMD5Digest (uint8_t * msg, size_t len, const MACKey& key, uint8_t * digest)
|
||||
// key is 32 bytes
|
||||
// digest is 16 bytes
|
||||
|
@ -642,6 +638,9 @@ namespace crypto
|
|||
{
|
||||
uint64_t buf[256];
|
||||
uint64_t hash[12]; // 96 bytes
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
#pragma GCC push_options
|
||||
#pragma GCC target("avx")
|
||||
if(i2p::cpu::avx)
|
||||
{
|
||||
__asm__
|
||||
|
@ -664,6 +663,8 @@ namespace crypto
|
|||
);
|
||||
}
|
||||
else
|
||||
#pragma GCC pop_options
|
||||
#endif
|
||||
{
|
||||
// ikeypad
|
||||
buf[0] = key.GetLL ()[0] ^ IPAD;
|
||||
|
@ -695,9 +696,6 @@ namespace crypto
|
|||
// calculate digest
|
||||
MD5((uint8_t *)hash, 96, digest);
|
||||
}
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
#pragma GCC pop_options
|
||||
#endif
|
||||
|
||||
// AES
|
||||
#ifdef __AES__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue