mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 01:49:41 +00:00
Clear alignment warnings on ARM 32-bit platforms
This commit is contained in:
parent
337d1c88c8
commit
30fc56d58c
@ -15,6 +15,14 @@
|
||||
# pragma warning(disable: 4146 4242 4244 4245)
|
||||
#endif
|
||||
|
||||
// Can't use GetAlignmentOf<word32>() because of C++11 and constexpr
|
||||
// Can use 'const unsigned int' because of MSVC 2013
|
||||
#if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64)
|
||||
# define ALIGN_SPEC 16
|
||||
#else
|
||||
# define ALIGN_SPEC 4
|
||||
#endif
|
||||
|
||||
#ifndef CRYPTOPP_DISABLE_NACL
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
@ -417,7 +425,7 @@ static void pow2523(gf o,const gf i)
|
||||
// https://github.com/jedisct1/libsodium/blob/master/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c
|
||||
static int has_small_order(const byte s[32])
|
||||
{
|
||||
CRYPTOPP_ALIGN_DATA(16)
|
||||
CRYPTOPP_ALIGN_DATA(ALIGN_SPEC)
|
||||
const byte blacklist[][32] = {
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
|
||||
{ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
|
||||
|
Loading…
Reference in New Issue
Block a user