mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:17:45 +00:00
LibCrypto: Add Chacha20Poly1305
This commit is contained in:
parent
4c5b9fa6a2
commit
73ef102b01
6 changed files with 430 additions and 1 deletions
|
@ -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] {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue