mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-29 04:07:49 +02:00
AES-NI encrypt and decrypt
This commit is contained in:
parent
527ac413b1
commit
236c606578
2 changed files with 59 additions and 3 deletions
6
aes.h
6
aes.h
|
@ -17,12 +17,14 @@ namespace crypto
|
|||
|
||||
#ifdef __x86_64__
|
||||
// AES-NI assumed
|
||||
class ECNEncryptionAESNI
|
||||
class ECNCryptoAESNI
|
||||
{
|
||||
public:
|
||||
|
||||
void SetKey (const uint8_t * key);
|
||||
|
||||
void Encrypt (const ChipherBlock * in, ChipherBlock * out);
|
||||
void Decrypt (const ChipherBlock * in, ChipherBlock * out);
|
||||
|
||||
private:
|
||||
|
||||
uint32_t m_KeySchedule[4*(14+1)]; // 14 rounds for AES-256
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue