mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57: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 Crypto::Authentication {
|
||||||
namespace Authentication {
|
|
||||||
|
|
||||||
GHash::TagType GHash::process(ReadonlyBytes aad, ReadonlyBytes cipher)
|
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>
|
# include <AK/DeprecatedString.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto::Authentication {
|
||||||
namespace Authentication {
|
|
||||||
|
|
||||||
void galois_multiply(u32 (&z)[4], const u32 (&x)[4], const u32 (&y)[4]);
|
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 IPAD = 0x36;
|
||||||
constexpr static auto OPAD = 0x5c;
|
constexpr static auto OPAD = 0x5c;
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto::Authentication {
|
||||||
namespace Authentication {
|
|
||||||
|
|
||||||
template<typename HashT>
|
template<typename HashT>
|
||||||
class HMAC {
|
class HMAC {
|
||||||
|
@ -121,4 +120,3 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -8,8 +8,7 @@
|
||||||
#include <LibCrypto/Cipher/AES.h>
|
#include <LibCrypto/Cipher/AES.h>
|
||||||
#include <LibCrypto/Cipher/AESTables.h>
|
#include <LibCrypto/Cipher/AESTables.h>
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto::Cipher {
|
||||||
namespace Cipher {
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
constexpr u32 get_key(T pt)
|
constexpr u32 get_key(T pt)
|
||||||
|
@ -405,4 +404,3 @@ void AESCipherBlock::overwrite(ReadonlyBytes bytes)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -17,8 +17,7 @@
|
||||||
# include <AK/DeprecatedString.h>
|
# include <AK/DeprecatedString.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto::Cipher {
|
||||||
namespace Cipher {
|
|
||||||
|
|
||||||
struct AESCipherBlock : public CipherBlock {
|
struct AESCipherBlock : public CipherBlock {
|
||||||
public:
|
public:
|
||||||
|
@ -132,4 +131,3 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
#include <AK/Span.h>
|
#include <AK/Span.h>
|
||||||
#include <AK/Types.h>
|
#include <AK/Types.h>
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto::Cipher {
|
||||||
namespace Cipher {
|
|
||||||
|
|
||||||
enum class Intent {
|
enum class Intent {
|
||||||
Encryption,
|
Encryption,
|
||||||
|
@ -123,4 +122,3 @@ private:
|
||||||
PaddingMode m_padding_mode;
|
PaddingMode m_padding_mode;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
# include <AK/DeprecatedString.h>
|
# include <AK/DeprecatedString.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto::Cipher {
|
||||||
namespace Cipher {
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class CBC : public Mode<T> {
|
class CBC : public Mode<T> {
|
||||||
|
@ -126,5 +125,3 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
# include <AK/DeprecatedString.h>
|
# include <AK/DeprecatedString.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto::Cipher {
|
||||||
namespace Cipher {
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Heads up: CTR is a *family* of modes, because the "counter" function is
|
* 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>
|
# include <AK/DeprecatedString.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto::Cipher {
|
||||||
namespace Cipher {
|
|
||||||
|
|
||||||
using IncrementFunction = IncrementInplace;
|
using IncrementFunction = IncrementInplace;
|
||||||
|
|
||||||
|
@ -148,5 +147,3 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -10,8 +10,7 @@
|
||||||
#include <AK/Span.h>
|
#include <AK/Span.h>
|
||||||
#include <LibCrypto/Cipher/Cipher.h>
|
#include <LibCrypto/Cipher/Cipher.h>
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto::Cipher {
|
||||||
namespace Cipher {
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class Mode {
|
class Mode {
|
||||||
|
@ -99,5 +98,3 @@ private:
|
||||||
T m_cipher;
|
T m_cipher;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
#include <LibCrypto/Hash/SHA1.h>
|
#include <LibCrypto/Hash/SHA1.h>
|
||||||
#include <LibCrypto/Hash/SHA2.h>
|
#include <LibCrypto/Hash/SHA2.h>
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto::Hash {
|
||||||
namespace Hash {
|
|
||||||
|
|
||||||
enum class HashKind {
|
enum class HashKind {
|
||||||
Unknown,
|
Unknown,
|
||||||
|
@ -219,4 +218,3 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -8,8 +8,7 @@
|
||||||
#include <LibCrypto/BigInt/Algorithms/UnsignedBigIntegerAlgorithms.h>
|
#include <LibCrypto/BigInt/Algorithms/UnsignedBigIntegerAlgorithms.h>
|
||||||
#include <LibCrypto/NumberTheory/ModularFunctions.h>
|
#include <LibCrypto/NumberTheory/ModularFunctions.h>
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto::NumberTheory {
|
||||||
namespace NumberTheory {
|
|
||||||
|
|
||||||
UnsignedBigInteger ModularInverse(UnsignedBigInteger const& a_, UnsignedBigInteger const& b)
|
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 <AK/Random.h>
|
||||||
#include <LibCrypto/BigInt/UnsignedBigInteger.h>
|
#include <LibCrypto/BigInt/UnsignedBigInteger.h>
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto::NumberTheory {
|
||||||
namespace NumberTheory {
|
|
||||||
|
|
||||||
UnsignedBigInteger ModularInverse(UnsignedBigInteger const& a_, UnsignedBigInteger const& b);
|
UnsignedBigInteger ModularInverse(UnsignedBigInteger const& a_, UnsignedBigInteger const& b);
|
||||||
UnsignedBigInteger ModularPower(UnsignedBigInteger const& b, UnsignedBigInteger const& e, UnsignedBigInteger const& m);
|
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);
|
UnsignedBigInteger random_big_prime(size_t bits);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -9,8 +9,7 @@
|
||||||
#include <LibCrypto/Hash/HashFunction.h>
|
#include <LibCrypto/Hash/HashFunction.h>
|
||||||
#include <LibCrypto/Verification.h>
|
#include <LibCrypto/Verification.h>
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto::PK {
|
||||||
namespace PK {
|
|
||||||
|
|
||||||
template<typename HashFunction>
|
template<typename HashFunction>
|
||||||
class Code {
|
class Code {
|
||||||
|
@ -34,4 +33,3 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
#include <LibCrypto/Hash/SHA2.h>
|
#include <LibCrypto/Hash/SHA2.h>
|
||||||
#include <LibCrypto/PK/Code/Code.h>
|
#include <LibCrypto/PK/Code/Code.h>
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto::PK {
|
||||||
namespace PK {
|
|
||||||
|
|
||||||
template<typename HashFunction>
|
template<typename HashFunction>
|
||||||
class EMSA_PKCS1_V1_5 : public Code<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 <AK/Vector.h>
|
||||||
#include <LibCrypto/PK/Code/Code.h>
|
#include <LibCrypto/PK/Code/Code.h>
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto::PK {
|
||||||
namespace PK {
|
|
||||||
|
|
||||||
template<typename HashFunction, size_t SaltSize>
|
template<typename HashFunction, size_t SaltSize>
|
||||||
class EMSA_PSS : public Code<HashFunction> {
|
class EMSA_PSS : public Code<HashFunction> {
|
||||||
|
@ -168,4 +167,3 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
# include <AK/DeprecatedString.h>
|
# include <AK/DeprecatedString.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto::PK {
|
||||||
namespace PK {
|
|
||||||
|
|
||||||
// FIXME: Fixing name up for grabs
|
// FIXME: Fixing name up for grabs
|
||||||
template<typename PrivKeyT, typename PubKeyT>
|
template<typename PrivKeyT, typename PubKeyT>
|
||||||
|
@ -50,4 +49,3 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
#include <LibCrypto/ASN1/PEM.h>
|
#include <LibCrypto/ASN1/PEM.h>
|
||||||
#include <LibCrypto/PK/RSA.h>
|
#include <LibCrypto/PK/RSA.h>
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto::PK {
|
||||||
namespace PK {
|
|
||||||
|
|
||||||
static constexpr Array<int, 7> pkcs8_rsa_key_oid { 1, 2, 840, 113549, 1, 1, 1 };
|
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");
|
dbgln("FIXME: RSA_PKCS_EME::verify");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
#include <LibCrypto/PK/Code/EMSA_PSS.h>
|
#include <LibCrypto/PK/Code/EMSA_PSS.h>
|
||||||
#include <LibCrypto/PK/PK.h>
|
#include <LibCrypto/PK/PK.h>
|
||||||
|
|
||||||
namespace Crypto {
|
namespace Crypto::PK {
|
||||||
namespace PK {
|
|
||||||
template<typename Integer = UnsignedBigInteger>
|
template<typename Integer = UnsignedBigInteger>
|
||||||
class RSAPublicKey {
|
class RSAPublicKey {
|
||||||
public:
|
public:
|
||||||
|
@ -225,4 +225,3 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -8,8 +8,7 @@
|
||||||
|
|
||||||
#include <AK/Types.h>
|
#include <AK/Types.h>
|
||||||
|
|
||||||
namespace EDID {
|
namespace EDID::Definitions {
|
||||||
namespace Definitions {
|
|
||||||
|
|
||||||
struct [[gnu::packed]] StandardTimings {
|
struct [[gnu::packed]] StandardTimings {
|
||||||
u8 horizontal_8_pixels;
|
u8 horizontal_8_pixels;
|
||||||
|
@ -157,4 +156,3 @@ struct [[gnu::packed]] ExtensionBlock {
|
||||||
static_assert(AssertSize<ExtensionBlock, 128>());
|
static_assert(AssertSize<ExtensionBlock, 128>());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -15,18 +15,14 @@
|
||||||
#include <LibGUI/UIDimensions.h>
|
#include <LibGUI/UIDimensions.h>
|
||||||
#include <LibGfx/Forward.h>
|
#include <LibGfx/Forward.h>
|
||||||
|
|
||||||
namespace Core {
|
namespace Core::Registration {
|
||||||
namespace Registration {
|
|
||||||
extern Core::ObjectClassRegistration registration_Layout;
|
extern Core::ObjectClassRegistration registration_Layout;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#define REGISTER_LAYOUT(namespace_, class_name) \
|
#define REGISTER_LAYOUT(namespace_, class_name) \
|
||||||
namespace Core { \
|
namespace Core::Registration { \
|
||||||
namespace Registration { \
|
|
||||||
Core::ObjectClassRegistration registration_##class_name( \
|
Core::ObjectClassRegistration registration_##class_name( \
|
||||||
#namespace_ "::" #class_name##sv, []() { return static_ptr_cast<Core::Object>(namespace_::class_name::construct()); }, ®istration_Layout); \
|
#namespace_ "::" #class_name##sv, []() { return static_ptr_cast<Core::Object>(namespace_::class_name::construct()); }, ®istration_Layout); \
|
||||||
} \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
|
|
@ -27,18 +27,14 @@
|
||||||
#include <LibGfx/Rect.h>
|
#include <LibGfx/Rect.h>
|
||||||
#include <LibGfx/StandardCursor.h>
|
#include <LibGfx/StandardCursor.h>
|
||||||
|
|
||||||
namespace Core {
|
namespace Core::Registration {
|
||||||
namespace Registration {
|
|
||||||
extern Core::ObjectClassRegistration registration_Widget;
|
extern Core::ObjectClassRegistration registration_Widget;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#define REGISTER_WIDGET(namespace_, class_name) \
|
#define REGISTER_WIDGET(namespace_, class_name) \
|
||||||
namespace Core { \
|
namespace Core::Registration { \
|
||||||
namespace Registration { \
|
|
||||||
Core::ObjectClassRegistration registration_##class_name( \
|
Core::ObjectClassRegistration registration_##class_name( \
|
||||||
#namespace_ "::" #class_name##sv, []() -> ErrorOr<NonnullRefPtr<Core::Object>> { return static_ptr_cast<Core::Object>(TRY(namespace_::class_name::try_create())); }, ®istration_Widget); \
|
#namespace_ "::" #class_name##sv, []() -> ErrorOr<NonnullRefPtr<Core::Object>> { return static_ptr_cast<Core::Object>(TRY(namespace_::class_name::try_create())); }, ®istration_Widget); \
|
||||||
} \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
|
|
@ -9,8 +9,7 @@
|
||||||
#include <AK/Types.h>
|
#include <AK/Types.h>
|
||||||
#include <LibLine/Style.h>
|
#include <LibLine/Style.h>
|
||||||
|
|
||||||
namespace Line {
|
namespace Line::VT {
|
||||||
namespace VT {
|
|
||||||
|
|
||||||
ErrorOr<void> save_cursor(Stream&);
|
ErrorOr<void> save_cursor(Stream&);
|
||||||
ErrorOr<void> restore_cursor(Stream&);
|
ErrorOr<void> restore_cursor(Stream&);
|
||||||
|
@ -21,4 +20,3 @@ ErrorOr<void> move_absolute(u32 x, u32 y, Stream&);
|
||||||
ErrorOr<void> apply_style(Style const&, Stream&, bool is_starting = true);
|
ErrorOr<void> apply_style(Style const&, Stream&, bool is_starting = true);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -6,8 +6,7 @@
|
||||||
|
|
||||||
#include <LibWeb/HTML/AttributeNames.h>
|
#include <LibWeb/HTML/AttributeNames.h>
|
||||||
|
|
||||||
namespace Web {
|
namespace Web::HTML {
|
||||||
namespace HTML {
|
|
||||||
namespace AttributeNames {
|
namespace AttributeNames {
|
||||||
|
|
||||||
#define __ENUMERATE_HTML_ATTRIBUTE(name) DeprecatedFlyString name;
|
#define __ENUMERATE_HTML_ATTRIBUTE(name) DeprecatedFlyString name;
|
||||||
|
@ -73,4 +72,3 @@ bool is_boolean_attribute(DeprecatedFlyString const& attribute)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -9,8 +9,7 @@
|
||||||
#include <AK/DeprecatedFlyString.h>
|
#include <AK/DeprecatedFlyString.h>
|
||||||
#include <AK/Error.h>
|
#include <AK/Error.h>
|
||||||
|
|
||||||
namespace Web {
|
namespace Web::HTML {
|
||||||
namespace HTML {
|
|
||||||
namespace AttributeNames {
|
namespace AttributeNames {
|
||||||
|
|
||||||
#define ENUMERATE_HTML_ATTRIBUTES \
|
#define ENUMERATE_HTML_ATTRIBUTES \
|
||||||
|
@ -250,4 +249,3 @@ ErrorOr<void> initialize_strings();
|
||||||
bool is_boolean_attribute(DeprecatedFlyString const& attribute);
|
bool is_boolean_attribute(DeprecatedFlyString const& attribute);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -7,8 +7,7 @@
|
||||||
#include <AK/StringView.h>
|
#include <AK/StringView.h>
|
||||||
#include <LibWeb/HTML/Parser/Entities.h>
|
#include <LibWeb/HTML/Parser/Entities.h>
|
||||||
|
|
||||||
namespace Web {
|
namespace Web::HTML {
|
||||||
namespace HTML {
|
|
||||||
|
|
||||||
Optional<EntityMatch> code_points_from_entity(StringView entity)
|
Optional<EntityMatch> code_points_from_entity(StringView entity)
|
||||||
{
|
{
|
||||||
|
@ -2278,4 +2277,3 @@ Optional<EntityMatch> code_points_from_entity(StringView entity)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -9,8 +9,7 @@
|
||||||
#include <AK/StringView.h>
|
#include <AK/StringView.h>
|
||||||
#include <AK/Vector.h>
|
#include <AK/Vector.h>
|
||||||
|
|
||||||
namespace Web {
|
namespace Web::HTML {
|
||||||
namespace HTML {
|
|
||||||
|
|
||||||
struct EntityMatch {
|
struct EntityMatch {
|
||||||
Vector<u32, 2> code_points;
|
Vector<u32, 2> code_points;
|
||||||
|
@ -20,4 +19,3 @@ struct EntityMatch {
|
||||||
Optional<EntityMatch> code_points_from_entity(StringView);
|
Optional<EntityMatch> code_points_from_entity(StringView);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue