mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-30 21:28:59 +00:00
LibTLS+LibCrypto: More ByteBuffer -> Span conversion
This commit is contained in:
parent
8e20208dd6
commit
f82b0a78ef
Notes:
sideshowbarker
2024-07-19 00:44:34 +09:00
Author: https://github.com/awesomekling
Commit: f82b0a78ef
13 changed files with 45 additions and 40 deletions
|
@ -96,6 +96,8 @@ struct SHA2Digest {
|
|||
// FIXME: I want template<size_t BlockSize> but the compiler gets confused
|
||||
class SHA256 final : public HashFunction<512, SHA2Digest<256 / 8>> {
|
||||
public:
|
||||
using HashFunction::update;
|
||||
|
||||
SHA256()
|
||||
{
|
||||
reset();
|
||||
|
@ -103,9 +105,6 @@ public:
|
|||
|
||||
virtual void update(const u8*, size_t) override;
|
||||
|
||||
virtual void update(const ByteBuffer& buffer) override { update(buffer.data(), buffer.size()); };
|
||||
virtual void update(const StringView& string) override { update((const u8*)string.characters_without_null_termination(), string.length()); };
|
||||
|
||||
virtual DigestType digest() override;
|
||||
virtual DigestType peek() override;
|
||||
|
||||
|
@ -149,6 +148,8 @@ private:
|
|||
|
||||
class SHA512 final : public HashFunction<1024, SHA2Digest<512 / 8>> {
|
||||
public:
|
||||
using HashFunction::update;
|
||||
|
||||
SHA512()
|
||||
{
|
||||
reset();
|
||||
|
@ -156,9 +157,6 @@ public:
|
|||
|
||||
virtual void update(const u8*, size_t) override;
|
||||
|
||||
virtual void update(const ByteBuffer& buffer) override { update(buffer.data(), buffer.size()); };
|
||||
virtual void update(const StringView& string) override { update((const u8*)string.characters_without_null_termination(), string.length()); };
|
||||
|
||||
virtual DigestType digest() override;
|
||||
virtual DigestType peek() override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue