mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:37:45 +00:00
LibCrypto: Add a Hash::Manager that can act as any one of the hashes
This commit is contained in:
parent
e997661e26
commit
43a49f5fff
6 changed files with 338 additions and 17 deletions
|
@ -88,6 +88,9 @@ constexpr static u64 InitializationHashes[8] = {
|
|||
template<size_t Bytes>
|
||||
struct SHA2Digest {
|
||||
u8 data[Bytes];
|
||||
constexpr static size_t Size = Bytes;
|
||||
const u8* immutable_data() const { return data; }
|
||||
size_t data_length() { return Bytes; }
|
||||
};
|
||||
|
||||
// FIXME: I want template<size_t BlockSize> but the compiler gets confused
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue