mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 18:50:50 +00:00
LibCrypto: Fix issues in the Crypto stack
This commit fixes up the following: - HMAC should not reuse a single hasher when successively updating - AES Key should not assume its user key is valid signed char* - Mode should have a virtual destructor And adds a RFC5246 padding mode, which is required for TLS
This commit is contained in:
parent
7adb93ede9
commit
f1578d7e9e
Notes:
sideshowbarker
2024-07-19 07:05:16 +09:00
Author: https://github.com/alimpfard
Commit: f1578d7e9e
Pull-request: https://github.com/SerenityOS/serenity/pull/1661
Reviewed-by: https://github.com/Dexesttp
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/itamar8910
10 changed files with 93 additions and 49 deletions
|
@ -220,18 +220,5 @@ namespace Hash {
|
|||
__builtin_memset(x, 0, sizeof(x));
|
||||
}
|
||||
|
||||
void MD5::reset()
|
||||
{
|
||||
m_A = MD5Constants::init_A;
|
||||
m_B = MD5Constants::init_B;
|
||||
m_C = MD5Constants::init_C;
|
||||
m_D = MD5Constants::init_D;
|
||||
|
||||
m_count[0] = 0;
|
||||
m_count[1] = 0;
|
||||
|
||||
__builtin_memset(m_data_buffer, 0, sizeof(m_data_buffer));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue