mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:27:35 +00:00
Everywhere: Run clang-format
This commit is contained in:
parent
0376c127f6
commit
086969277e
1665 changed files with 8479 additions and 8479 deletions
|
@ -52,7 +52,7 @@ class MD5 final : public HashFunction<512, 128> {
|
|||
public:
|
||||
using HashFunction::update;
|
||||
|
||||
virtual void update(const u8*, size_t) override;
|
||||
virtual void update(u8 const*, size_t) override;
|
||||
virtual DigestType digest() override;
|
||||
virtual DigestType peek() override;
|
||||
|
||||
|
@ -63,15 +63,15 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
inline static DigestType hash(const u8* data, size_t length)
|
||||
inline static DigestType hash(u8 const* data, size_t length)
|
||||
{
|
||||
MD5 md5;
|
||||
md5.update(data, length);
|
||||
return md5.digest();
|
||||
}
|
||||
|
||||
inline static DigestType hash(const ByteBuffer& buffer) { return hash(buffer.data(), buffer.size()); }
|
||||
inline static DigestType hash(StringView buffer) { return hash((const u8*)buffer.characters_without_null_termination(), buffer.length()); }
|
||||
inline static DigestType hash(ByteBuffer const& buffer) { return hash(buffer.data(), buffer.size()); }
|
||||
inline static DigestType hash(StringView buffer) { return hash((u8 const*)buffer.characters_without_null_termination(), buffer.length()); }
|
||||
inline virtual void reset() override
|
||||
{
|
||||
m_A = MD5Constants::init_A;
|
||||
|
@ -86,10 +86,10 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
inline void transform(const u8*);
|
||||
inline void transform(u8 const*);
|
||||
|
||||
static void encode(const u32* from, u8* to, size_t length);
|
||||
static void decode(const u8* from, u32* to, size_t length);
|
||||
static void encode(u32 const* from, u8* to, size_t length);
|
||||
static void decode(u8 const* from, u32* to, size_t length);
|
||||
|
||||
u32 m_A { MD5Constants::init_A }, m_B { MD5Constants::init_B }, m_C { MD5Constants::init_C }, m_D { MD5Constants::init_D };
|
||||
u32 m_count[2] { 0, 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue