mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibCrypto: Make Digest
s able to return bytes
This commit is contained in:
parent
3f0e425f1e
commit
22efc34ec5
Notes:
sideshowbarker
2024-07-17 21:39:38 +09:00
Author: https://github.com/mhermier
Commit: 22efc34ec5
Pull-request: https://github.com/SerenityOS/serenity/pull/11605
Reviewed-by: https://github.com/alimpfard
3 changed files with 10 additions and 2 deletions
|
@ -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>>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue