diff options
Diffstat (limited to 'Userland/Libraries/LibCrypto/Authentication')
-rw-r--r-- | Userland/Libraries/LibCrypto/Authentication/GHash.cpp | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibCrypto/Authentication/GHash.h | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibCrypto/Authentication/HMAC.h | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/Userland/Libraries/LibCrypto/Authentication/GHash.cpp b/Userland/Libraries/LibCrypto/Authentication/GHash.cpp index de06e63087..396da9b53f 100644 --- a/Userland/Libraries/LibCrypto/Authentication/GHash.cpp +++ b/Userland/Libraries/LibCrypto/Authentication/GHash.cpp @@ -12,12 +12,12 @@ namespace { -static u32 to_u32(const u8* b) +static u32 to_u32(u8 const* b) { return AK::convert_between_host_and_big_endian(ByteReader::load32(b)); } -static void to_u8s(u8* b, const u32* w) +static void to_u8s(u8* b, u32 const* w) { for (auto i = 0; i < 4; ++i) { ByteReader::store(b + i * 4, AK::convert_between_host_and_big_endian(w[i])); diff --git a/Userland/Libraries/LibCrypto/Authentication/GHash.h b/Userland/Libraries/LibCrypto/Authentication/GHash.h index 0bfc8274cd..21b6039d5d 100644 --- a/Userland/Libraries/LibCrypto/Authentication/GHash.h +++ b/Userland/Libraries/LibCrypto/Authentication/GHash.h @@ -24,7 +24,7 @@ struct GHashDigest { constexpr static size_t Size = 16; u8 data[Size]; - const u8* immutable_data() const { return data; } + u8 const* immutable_data() const { return data; } size_t data_length() { return Size; } }; @@ -33,7 +33,7 @@ public: using TagType = GHashDigest; template<size_t N> - explicit GHash(const char (&key)[N]) + explicit GHash(char const (&key)[N]) : GHash({ key, N }) { } diff --git a/Userland/Libraries/LibCrypto/Authentication/HMAC.h b/Userland/Libraries/LibCrypto/Authentication/HMAC.h index 8c80602dbe..29c9ce1300 100644 --- a/Userland/Libraries/LibCrypto/Authentication/HMAC.h +++ b/Userland/Libraries/LibCrypto/Authentication/HMAC.h @@ -39,23 +39,23 @@ public: reset(); } - TagType process(const u8* message, size_t length) + TagType process(u8 const* message, size_t length) { reset(); update(message, length); return digest(); } - void update(const u8* message, size_t length) + void update(u8 const* message, size_t length) { m_inner_hasher.update(message, length); } TagType process(ReadonlyBytes span) { return process(span.data(), span.size()); } - TagType process(StringView string) { return process((const u8*)string.characters_without_null_termination(), string.length()); } + TagType process(StringView string) { return process((u8 const*)string.characters_without_null_termination(), string.length()); } void update(ReadonlyBytes span) { return update(span.data(), span.size()); } - void update(StringView string) { return update((const u8*)string.characters_without_null_termination(), string.length()); } + void update(StringView string) { return update((u8 const*)string.characters_without_null_termination(), string.length()); } TagType digest() { @@ -84,7 +84,7 @@ public: #endif private: - void derive_key(const u8* key, size_t length) + void derive_key(u8 const* key, size_t length) { auto block_size = m_inner_hasher.block_size(); // Note: The block size of all the current hash functions is 512 bits. |