mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-20 08:18:55 +00:00
LibCrypto: Mutualize Digest
s
This commit is contained in:
parent
4e851145ba
commit
3f0e425f1e
Notes:
sideshowbarker
2024-07-17 21:39:42 +09:00
Author: https://github.com/mhermier
Commit: 3f0e425f1e
Pull-request: https://github.com/SerenityOS/serenity/pull/11605
Reviewed-by: https://github.com/alimpfard
5 changed files with 21 additions and 33 deletions
|
@ -25,16 +25,7 @@ constexpr static u32 RoundConstants[4] {
|
|||
|
||||
}
|
||||
|
||||
template<size_t Bytes>
|
||||
struct SHA1Digest {
|
||||
u8 data[Bytes];
|
||||
constexpr static size_t Size = Bytes;
|
||||
|
||||
const u8* immutable_data() const { return data; }
|
||||
size_t data_length() const { return Bytes; }
|
||||
};
|
||||
|
||||
class SHA1 final : public HashFunction<512, SHA1Digest<160 / 8>> {
|
||||
class SHA1 final : public HashFunction<512, 160> {
|
||||
public:
|
||||
using HashFunction::update;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue