mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-30 04:37:50 +02:00
cast
Signed-off-by: contextswap <ctxswp@proton.me>
This commit is contained in:
parent
97e45216fc
commit
93ec3d31b9
1 changed files with 5 additions and 5 deletions
|
@ -806,7 +806,7 @@ namespace crypto
|
|||
#ifdef __AES__
|
||||
if(i2p::cpu::aesni)
|
||||
{
|
||||
__m128 xmm_1 = _mm_loadu_ps((float const*)&m_IV);
|
||||
__m128 xmm_1 = _mm_loadu_ps((float const*)(uint8_t const*)m_IV);
|
||||
__m128 xmm_0, xmm_2;
|
||||
uint8_t *sched = m_ECBDecryption.GetKeySchedule();
|
||||
for (int i = 0; i < numBlocks; i++) {
|
||||
|
@ -819,7 +819,7 @@ namespace crypto
|
|||
in = (ChipherBlock const*)((uint8_t const*)in + 16);
|
||||
out = (ChipherBlock *)((uint8_t *)out + 16);
|
||||
}
|
||||
_mm_storeu_ps((float*)&m_IV, xmm_1);
|
||||
_mm_storeu_ps((float*)(uint8_t*)m_IV, xmm_1);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
@ -846,9 +846,9 @@ namespace crypto
|
|||
#ifdef __AES__
|
||||
if(i2p::cpu::aesni)
|
||||
{
|
||||
__m128 xmm_1 = _mm_load_ps((float const*)&m_IV);
|
||||
__m128 xmm_1 = _mm_load_ps((float const*)(uint8_t const*)m_IV);
|
||||
__m128 xmm_0 = _mm_load_ps((float const*)in);
|
||||
_mm_store_ps((float*)&m_IV, xmm_0);
|
||||
_mm_store_ps((float*)(uint8_t*)m_IV, xmm_0);
|
||||
uint8_t *sched = m_ECBDecryption.GetKeySchedule();
|
||||
DecryptAES256(sched)
|
||||
xmm_0 = (__m128)_mm_xor_si128((__m128i)xmm_0, (__m128i)xmm_1);
|
||||
|
@ -906,7 +906,7 @@ namespace crypto
|
|||
for (int i = 0; i < 63/*blocks = 1008 bytes*/; i++) {
|
||||
in += 16, out += 16;
|
||||
xmm_0 = _mm_loadu_ps((float const*)in);
|
||||
_mm_store_ps((float*)&xmm_2, xmm_0);
|
||||
xmm_2 = _mm_load_ps((float const*)&xmm_0);
|
||||
DecryptAES256(sched_l)
|
||||
xmm_0 = (__m128)_mm_xor_si128((__m128i)xmm_0, (__m128i)xmm_1);
|
||||
_mm_storeu_ps((float*)out, xmm_0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue