core: use nested namespaces
This commit is contained in:
parent
f409342ab5
commit
39e163b7ce
19 changed files with 40 additions and 80 deletions
|
@ -6,8 +6,7 @@
|
|||
#include <functional>
|
||||
#include "core/hw/aes/arithmetic128.h"
|
||||
|
||||
namespace HW {
|
||||
namespace AES {
|
||||
namespace HW::AES {
|
||||
|
||||
AESKey Lrot128(const AESKey& in, u32 rot) {
|
||||
AESKey out;
|
||||
|
@ -43,5 +42,4 @@ AESKey Xor128(const AESKey& a, const AESKey& b) {
|
|||
return out;
|
||||
}
|
||||
|
||||
} // namespace AES
|
||||
} // namespace HW
|
||||
} // namespace HW::AES
|
||||
|
|
|
@ -7,11 +7,9 @@
|
|||
#include "common/common_types.h"
|
||||
#include "core/hw/aes/key.h"
|
||||
|
||||
namespace HW {
|
||||
namespace AES {
|
||||
namespace HW::AES {
|
||||
AESKey Lrot128(const AESKey& in, u32 rot);
|
||||
AESKey Add128(const AESKey& a, const AESKey& b);
|
||||
AESKey Xor128(const AESKey& a, const AESKey& b);
|
||||
|
||||
} // namespace AES
|
||||
} // namespace HW
|
||||
} // namespace HW::AES
|
||||
|
|
|
@ -12,8 +12,7 @@
|
|||
#include "core/hw/aes/ccm.h"
|
||||
#include "core/hw/aes/key.h"
|
||||
|
||||
namespace HW {
|
||||
namespace AES {
|
||||
namespace HW::AES {
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -91,5 +90,4 @@ std::vector<u8> DecryptVerifyCCM(const std::vector<u8>& cipher, const CCMNonce&
|
|||
return pdata;
|
||||
}
|
||||
|
||||
} // namespace AES
|
||||
} // namespace HW
|
||||
} // namespace HW::AES
|
||||
|
|
|
@ -9,8 +9,7 @@
|
|||
#include <vector>
|
||||
#include "common/common_types.h"
|
||||
|
||||
namespace HW {
|
||||
namespace AES {
|
||||
namespace HW::AES {
|
||||
|
||||
constexpr std::size_t CCM_NONCE_SIZE = 12;
|
||||
constexpr std::size_t CCM_MAC_SIZE = 16;
|
||||
|
@ -37,5 +36,4 @@ std::vector<u8> EncryptSignCCM(const std::vector<u8>& pdata, const CCMNonce& non
|
|||
std::vector<u8> DecryptVerifyCCM(const std::vector<u8>& cipher, const CCMNonce& nonce,
|
||||
std::size_t slot_id);
|
||||
|
||||
} // namespace AES
|
||||
} // namespace HW
|
||||
} // namespace HW::AES
|
||||
|
|
|
@ -18,8 +18,7 @@
|
|||
#include "core/hw/aes/arithmetic128.h"
|
||||
#include "core/hw/aes/key.h"
|
||||
|
||||
namespace HW {
|
||||
namespace AES {
|
||||
namespace HW::AES {
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -475,5 +474,4 @@ void SelectCommonKeyIndex(u8 index) {
|
|||
key_slots[KeySlotID::TicketCommonKey].SetKeyY(common_key_y_slots.at(index));
|
||||
}
|
||||
|
||||
} // namespace AES
|
||||
} // namespace HW
|
||||
} // namespace HW::AES
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
#include <cstddef>
|
||||
#include "common/common_types.h"
|
||||
|
||||
namespace HW {
|
||||
namespace AES {
|
||||
namespace HW::AES {
|
||||
|
||||
enum KeySlotID : std::size_t {
|
||||
|
||||
|
@ -50,5 +49,4 @@ AESKey GetNormalKey(std::size_t slot_id);
|
|||
|
||||
void SelectCommonKeyIndex(u8 index);
|
||||
|
||||
} // namespace AES
|
||||
} // namespace HW
|
||||
} // namespace HW::AES
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
#include "core/hw/y2r.h"
|
||||
#include "core/memory.h"
|
||||
|
||||
namespace HW {
|
||||
namespace Y2R {
|
||||
namespace HW::Y2R {
|
||||
|
||||
using namespace Service::Y2R;
|
||||
|
||||
|
@ -377,5 +376,4 @@ void PerformConversion(ConversionConfiguration& cvt) {
|
|||
cvt.output_format, (u8)cvt.alpha);
|
||||
}
|
||||
}
|
||||
} // namespace Y2R
|
||||
} // namespace HW
|
||||
} // namespace HW::Y2R
|
||||
|
|
|
@ -4,14 +4,10 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
namespace Service {
|
||||
namespace Y2R {
|
||||
namespace Service::Y2R {
|
||||
struct ConversionConfiguration;
|
||||
}
|
||||
} // namespace Service
|
||||
} // namespace Service::Y2R
|
||||
|
||||
namespace HW {
|
||||
namespace Y2R {
|
||||
namespace HW::Y2R {
|
||||
void PerformConversion(Service::Y2R::ConversionConfiguration& cvt);
|
||||
}
|
||||
} // namespace HW
|
||||
} // namespace HW::Y2R
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue