1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:17:35 +00:00

LibCrypto: Add Chacha20Poly1305

This commit is contained in:
stelar7 2023-09-25 19:46:21 +02:00 committed by Ali Mohammad Pur
parent 4c5b9fa6a2
commit 73ef102b01
6 changed files with 430 additions and 1 deletions

View file

@ -19,10 +19,11 @@ public:
void encrypt(ReadonlyBytes input, Bytes& output);
void decrypt(ReadonlyBytes input, Bytes& output);
void generate_block();
ReadonlyBytes block() const { return { m_block, 64 }; }
private:
void run_cipher(ReadonlyBytes input, Bytes& output);
void generate_block();
ALWAYS_INLINE void do_quarter_round(u32& a, u32& b, u32& c, u32& d);
u32 m_state[16] {};