@@ -10,8 +10,7 @@
#include <AK/StringView.h>
#include <AK/Types.h>
-namespace Crypto {
-namespace Hash {
+namespace Crypto::Hash {
template<size_t DigestS>
struct Digest {
@@ -59,4 +58,3 @@ protected:
virtual ~HashFunction() = default;
};
}
-}
@@ -45,8 +45,7 @@ static constexpr void round_4(u32& a, u32 b, u32 c, u32 d, u32 x, u32 s, u32 ac)
a += b;
void MD5::update(u8 const* input, size_t length)
{
@@ -204,4 +203,3 @@ void MD5::transform(u8 const* block)
@@ -13,8 +13,7 @@
# include <AK/DeprecatedString.h>
#endif
namespace MD5Constants {
@@ -98,5 +97,3 @@ private:
-
@@ -9,8 +9,7 @@
#include <LibCrypto/Hash/SHA1.h>
static constexpr auto ROTATE_LEFT(u32 value, size_t bits)
@@ -147,4 +146,3 @@ SHA1::DigestType SHA1::peek()
@@ -12,8 +12,7 @@
namespace SHA1Constants {
@@ -81,4 +80,3 @@ private:
@@ -7,8 +7,7 @@
#include <LibCrypto/Hash/SHA2.h>
constexpr static auto ROTRIGHT(u32 a, size_t b) { return (a >> b) | (a << (32 - b)); }
constexpr static auto CH(u32 x, u32 y, u32 z) { return (x & y) ^ (z & ~x); }
constexpr static auto MAJ(u32 x, u32 y, u32 z) { return (x & y) ^ (x & z) ^ (y & z); }
@@ -393,4 +392,3 @@ SHA512::DigestType SHA512::peek()
return digest;
namespace SHA256Constants {
constexpr static u32 RoundConstants[64] {
@@ -233,4 +232,3 @@ private: