1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 09:07:44 +00:00

Everywhere: Pass AK::ReadonlyBytes by value

This commit is contained in:
Andreas Kling 2021-11-11 01:06:34 +01:00
parent 8b1108e485
commit 80d4e830a0
42 changed files with 96 additions and 96 deletions

View file

@ -34,7 +34,7 @@ public:
{
}
explicit GHash(const ReadonlyBytes& key)
explicit GHash(ReadonlyBytes key)
{
VERIFY(key.size() >= 16);
for (size_t i = 0; i < 16; i += 4) {

View file

@ -64,7 +64,7 @@ public:
encrypt(in, out, ivec);
}
void encrypt(const ReadonlyBytes& in, Bytes out, const ReadonlyBytes& iv_in, const ReadonlyBytes& aad, Bytes tag)
void encrypt(ReadonlyBytes in, Bytes out, ReadonlyBytes iv_in, ReadonlyBytes aad, Bytes tag)
{
auto iv_buf_result = ByteBuffer::copy(iv_in);
// Not enough memory to figure out :shrug:

View file

@ -27,7 +27,7 @@ public:
virtual void update(const u8*, size_t) = 0;
void update(const Bytes& buffer) { update(buffer.data(), buffer.size()); };
void update(const ReadonlyBytes& buffer) { update(buffer.data(), buffer.size()); };
void update(ReadonlyBytes buffer) { update(buffer.data(), buffer.size()); };
void update(const ByteBuffer& buffer) { update(buffer.data(), buffer.size()); };
void update(StringView string) { update((const u8*)string.characters_without_null_termination(), string.length()); };