1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:37:35 +00:00

LibCrypto: Make Digests able to return bytes

This commit is contained in:
Michel Hermier 2022-01-04 02:34:00 +01:00 committed by Ali Mohammad Pur
parent 3f0e425f1e
commit 22efc34ec5
3 changed files with 10 additions and 2 deletions

View file

@ -21,6 +21,8 @@ struct Digest {
[[nodiscard]] ALWAYS_INLINE const u8* immutable_data() const { return data; }
[[nodiscard]] ALWAYS_INLINE size_t data_length() const { return Size; }
[[nodiscard]] ALWAYS_INLINE ReadonlyBytes bytes() const { return { immutable_data(), data_length() }; }
};
template<size_t BlockS, size_t DigestS, typename DigestT = Digest<DigestS>>