mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 06:27:45 +00:00
Everywhere: Use nested namespace qualifiers
This commit is contained in:
parent
a2f33fdcef
commit
66e210e406
27 changed files with 30 additions and 91 deletions
|
@ -25,8 +25,7 @@ static void to_u8s(u8* b, u32 const* w)
|
|||
|
||||
}
|
||||
|
||||
namespace Crypto {
|
||||
namespace Authentication {
|
||||
namespace Crypto::Authentication {
|
||||
|
||||
GHash::TagType GHash::process(ReadonlyBytes aad, ReadonlyBytes cipher)
|
||||
{
|
||||
|
@ -118,4 +117,3 @@ void galois_multiply(u32 (&z)[4], const u32 (&_x)[4], const u32 (&_y)[4])
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
# include <AK/DeprecatedString.h>
|
||||
#endif
|
||||
|
||||
namespace Crypto {
|
||||
namespace Authentication {
|
||||
namespace Crypto::Authentication {
|
||||
|
||||
void galois_multiply(u32 (&z)[4], const u32 (&x)[4], const u32 (&y)[4]);
|
||||
|
||||
|
@ -62,5 +61,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,8 +19,7 @@
|
|||
constexpr static auto IPAD = 0x36;
|
||||
constexpr static auto OPAD = 0x5c;
|
||||
|
||||
namespace Crypto {
|
||||
namespace Authentication {
|
||||
namespace Crypto::Authentication {
|
||||
|
||||
template<typename HashT>
|
||||
class HMAC {
|
||||
|
@ -121,4 +120,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
#include <LibCrypto/Cipher/AES.h>
|
||||
#include <LibCrypto/Cipher/AESTables.h>
|
||||
|
||||
namespace Crypto {
|
||||
namespace Cipher {
|
||||
namespace Crypto::Cipher {
|
||||
|
||||
template<typename T>
|
||||
constexpr u32 get_key(T pt)
|
||||
|
@ -405,4 +404,3 @@ void AESCipherBlock::overwrite(ReadonlyBytes bytes)
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
# include <AK/DeprecatedString.h>
|
||||
#endif
|
||||
|
||||
namespace Crypto {
|
||||
namespace Cipher {
|
||||
namespace Crypto::Cipher {
|
||||
|
||||
struct AESCipherBlock : public CipherBlock {
|
||||
public:
|
||||
|
@ -132,4 +131,3 @@ protected:
|
|||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,8 +11,7 @@
|
|||
#include <AK/Span.h>
|
||||
#include <AK/Types.h>
|
||||
|
||||
namespace Crypto {
|
||||
namespace Cipher {
|
||||
namespace Crypto::Cipher {
|
||||
|
||||
enum class Intent {
|
||||
Encryption,
|
||||
|
@ -123,4 +122,3 @@ private:
|
|||
PaddingMode m_padding_mode;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
# include <AK/DeprecatedString.h>
|
||||
#endif
|
||||
|
||||
namespace Crypto {
|
||||
namespace Cipher {
|
||||
namespace Crypto::Cipher {
|
||||
|
||||
template<typename T>
|
||||
class CBC : public Mode<T> {
|
||||
|
@ -126,5 +125,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
# include <AK/DeprecatedString.h>
|
||||
#endif
|
||||
|
||||
namespace Crypto {
|
||||
namespace Cipher {
|
||||
namespace Crypto::Cipher {
|
||||
|
||||
/*
|
||||
* Heads up: CTR is a *family* of modes, because the "counter" function is
|
||||
|
@ -194,4 +193,3 @@ protected:
|
|||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,8 +18,7 @@
|
|||
# include <AK/DeprecatedString.h>
|
||||
#endif
|
||||
|
||||
namespace Crypto {
|
||||
namespace Cipher {
|
||||
namespace Crypto::Cipher {
|
||||
|
||||
using IncrementFunction = IncrementInplace;
|
||||
|
||||
|
@ -148,5 +147,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,8 +10,7 @@
|
|||
#include <AK/Span.h>
|
||||
#include <LibCrypto/Cipher/Cipher.h>
|
||||
|
||||
namespace Crypto {
|
||||
namespace Cipher {
|
||||
namespace Crypto::Cipher {
|
||||
|
||||
template<typename T>
|
||||
class Mode {
|
||||
|
@ -99,5 +98,3 @@ private:
|
|||
T m_cipher;
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
#include <LibCrypto/Hash/SHA1.h>
|
||||
#include <LibCrypto/Hash/SHA2.h>
|
||||
|
||||
namespace Crypto {
|
||||
namespace Hash {
|
||||
namespace Crypto::Hash {
|
||||
|
||||
enum class HashKind {
|
||||
Unknown,
|
||||
|
@ -219,4 +218,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
#include <LibCrypto/BigInt/Algorithms/UnsignedBigIntegerAlgorithms.h>
|
||||
#include <LibCrypto/NumberTheory/ModularFunctions.h>
|
||||
|
||||
namespace Crypto {
|
||||
namespace NumberTheory {
|
||||
namespace Crypto::NumberTheory {
|
||||
|
||||
UnsignedBigInteger ModularInverse(UnsignedBigInteger const& a_, UnsignedBigInteger const& b)
|
||||
{
|
||||
|
@ -232,4 +231,3 @@ UnsignedBigInteger random_big_prime(size_t bits)
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,8 +9,7 @@
|
|||
#include <AK/Random.h>
|
||||
#include <LibCrypto/BigInt/UnsignedBigInteger.h>
|
||||
|
||||
namespace Crypto {
|
||||
namespace NumberTheory {
|
||||
namespace Crypto::NumberTheory {
|
||||
|
||||
UnsignedBigInteger ModularInverse(UnsignedBigInteger const& a_, UnsignedBigInteger const& b);
|
||||
UnsignedBigInteger ModularPower(UnsignedBigInteger const& b, UnsignedBigInteger const& e, UnsignedBigInteger const& m);
|
||||
|
@ -47,4 +46,3 @@ bool is_probably_prime(UnsignedBigInteger const& p);
|
|||
UnsignedBigInteger random_big_prime(size_t bits);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,8 +9,7 @@
|
|||
#include <LibCrypto/Hash/HashFunction.h>
|
||||
#include <LibCrypto/Verification.h>
|
||||
|
||||
namespace Crypto {
|
||||
namespace PK {
|
||||
namespace Crypto::PK {
|
||||
|
||||
template<typename HashFunction>
|
||||
class Code {
|
||||
|
@ -34,4 +33,3 @@ protected:
|
|||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,8 +12,7 @@
|
|||
#include <LibCrypto/Hash/SHA2.h>
|
||||
#include <LibCrypto/PK/Code/Code.h>
|
||||
|
||||
namespace Crypto {
|
||||
namespace PK {
|
||||
namespace Crypto::PK {
|
||||
|
||||
template<typename HashFunction>
|
||||
class EMSA_PKCS1_V1_5 : public Code<HashFunction> {
|
||||
|
@ -135,4 +134,3 @@ inline ReadonlyBytes EMSA_PKCS1_V1_5<Crypto::Hash::Manager>::hash_function_diges
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
#include <AK/Vector.h>
|
||||
#include <LibCrypto/PK/Code/Code.h>
|
||||
|
||||
namespace Crypto {
|
||||
namespace PK {
|
||||
namespace Crypto::PK {
|
||||
|
||||
template<typename HashFunction, size_t SaltSize>
|
||||
class EMSA_PSS : public Code<HashFunction> {
|
||||
|
@ -168,4 +167,3 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,8 +12,7 @@
|
|||
# include <AK/DeprecatedString.h>
|
||||
#endif
|
||||
|
||||
namespace Crypto {
|
||||
namespace PK {
|
||||
namespace Crypto::PK {
|
||||
|
||||
// FIXME: Fixing name up for grabs
|
||||
template<typename PrivKeyT, typename PubKeyT>
|
||||
|
@ -50,4 +49,3 @@ protected:
|
|||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,8 +12,7 @@
|
|||
#include <LibCrypto/ASN1/PEM.h>
|
||||
#include <LibCrypto/PK/RSA.h>
|
||||
|
||||
namespace Crypto {
|
||||
namespace PK {
|
||||
namespace Crypto::PK {
|
||||
|
||||
static constexpr Array<int, 7> pkcs8_rsa_key_oid { 1, 2, 840, 113549, 1, 1, 1 };
|
||||
|
||||
|
@ -418,4 +417,3 @@ void RSA_PKCS1_EME::verify(ReadonlyBytes, Bytes&)
|
|||
dbgln("FIXME: RSA_PKCS_EME::verify");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
#include <LibCrypto/PK/Code/EMSA_PSS.h>
|
||||
#include <LibCrypto/PK/PK.h>
|
||||
|
||||
namespace Crypto {
|
||||
namespace PK {
|
||||
namespace Crypto::PK {
|
||||
|
||||
template<typename Integer = UnsignedBigInteger>
|
||||
class RSAPublicKey {
|
||||
public:
|
||||
|
@ -225,4 +225,3 @@ public:
|
|||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue