mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-22 00:59:08 +01:00
AES-NI encrypt and decrypt
This commit is contained in:
parent
236c606578
commit
54e042b08d
2 changed files with 4 additions and 4 deletions
6
aes.cpp
6
aes.cpp
|
@ -33,7 +33,7 @@ namespace crypto
|
||||||
"add $32, %%rcx \n"
|
"add $32, %%rcx \n"
|
||||||
|
|
||||||
|
|
||||||
void ECNCryptoAESNI::SetKey (const uint8_t * key)
|
void ECBCryptoAESNI::SetKey (const uint8_t * key)
|
||||||
{
|
{
|
||||||
__asm__
|
__asm__
|
||||||
(
|
(
|
||||||
|
@ -72,7 +72,7 @@ namespace crypto
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ECNCryptoAESNI::Encrypt (const ChipherBlock * in, ChipherBlock * out)
|
void ECBCryptoAESNI::Encrypt (const ChipherBlock * in, ChipherBlock * out)
|
||||||
{
|
{
|
||||||
__asm__
|
__asm__
|
||||||
(
|
(
|
||||||
|
@ -99,7 +99,7 @@ namespace crypto
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ECNCryptoAESNI::Decrypt (const ChipherBlock * in, ChipherBlock * out)
|
void ECBCryptoAESNI::Decrypt (const ChipherBlock * in, ChipherBlock * out)
|
||||||
{
|
{
|
||||||
__asm__
|
__asm__
|
||||||
(
|
(
|
||||||
|
|
2
aes.h
2
aes.h
|
@ -17,7 +17,7 @@ namespace crypto
|
||||||
|
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
// AES-NI assumed
|
// AES-NI assumed
|
||||||
class ECNCryptoAESNI
|
class ECBCryptoAESNI
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue