mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 13:17:34 +00:00
LibCrypto+LibTLS+Kernel: Switch the Cipher::Mode interface to use Span
This shaves 2.5 more runtime seconds off 'disasm /bin/id', and makes the Mode<T> interface a lot more allocation-friendly.
This commit is contained in:
parent
caedd05bd8
commit
bc7a149039
11 changed files with 182 additions and 153 deletions
|
@ -68,8 +68,11 @@ public:
|
|||
m_inner_hasher.update(message, length);
|
||||
}
|
||||
|
||||
TagType process(const ReadonlyBytes& span) { return process(span.data(), span.size()); }
|
||||
TagType process(const ByteBuffer& buffer) { return process(buffer.data(), buffer.size()); }
|
||||
TagType process(const StringView& string) { return process((const u8*)string.characters_without_null_termination(), string.length()); }
|
||||
|
||||
void update(const ReadonlyBytes& span) { return update(span.data(), span.size()); }
|
||||
void update(const ByteBuffer& buffer) { return update(buffer.data(), buffer.size()); }
|
||||
void update(const StringView& string) { return update((const u8*)string.characters_without_null_termination(), string.length()); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue