mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2025-02-16 03:17:44 +00:00
ByteReverseArray → ReverseByteArrayLE
This commit is contained in:
parent
2c18fe8af8
commit
923cf95571
@ -771,7 +771,7 @@ void Rijndael_UncheckedSetKeyRev_AESNI(word32 *key, unsigned int rounds)
|
||||
typedef __vector unsigned char uint8x16_p8;
|
||||
typedef __vector unsigned long long uint64x2_p8;
|
||||
|
||||
void ByteReverseArray(byte src[16])
|
||||
void ReverseByteArrayLE(byte src[16])
|
||||
{
|
||||
#if defined(CRYPTOPP_XLC_VERSION) && defined(IS_LITTLE_ENDIAN)
|
||||
vec_st(vec_reve(vec_ld(0, src)), 0, src);
|
||||
@ -854,7 +854,7 @@ static inline uint64x2_p8 Load64x2(int off, const uint8_t src[16])
|
||||
return (uint64x2_p8)vec_xl_be(off, (uint8_t*)src);
|
||||
#else
|
||||
# if defined(IS_LITTLE_ENDIAN)
|
||||
return Reverse64x2((uint64x2_p8)vec_vsx_ld(off, src));
|
||||
return (uint64x2_p8)Reverse8x16(vec_vsx_ld(off, src));
|
||||
# else
|
||||
return (uint64x2_p8)vec_vsx_ld(off, src);
|
||||
# endif
|
||||
|
@ -251,7 +251,7 @@ extern size_t Rijndael_Dec_AdvancedProcessBlocks_ARMV8(const word32 *subkeys, si
|
||||
#endif
|
||||
|
||||
#if (CRYPTOPP_POWER8_AES_AVAILABLE)
|
||||
extern void ByteReverseArray(byte src[16]);
|
||||
extern void ReverseByteArrayLE(byte src[16]);
|
||||
|
||||
extern size_t Rijndael_Enc_AdvancedProcessBlocks_POWER8(const word32 *subkeys, size_t rounds,
|
||||
const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags);
|
||||
@ -329,7 +329,7 @@ void Rijndael::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLen, c
|
||||
// reversed on little-endian systems to ensure it loads properly.
|
||||
byte * ptr = reinterpret_cast<byte*>(rk);
|
||||
for (unsigned int i=0; i<=m_rounds; i++)
|
||||
ByteReverseArray(ptr+i*16);
|
||||
ReverseByteArrayLE(ptr+i*16);
|
||||
#endif // IS_LITTLE_ENDIAN
|
||||
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user