summaryrefslogtreecommitdiffstats
path: root/src/core/crypto/partition_data_manager.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-10-13 14:52:34 +0200
committerLioncash <mathew1800@gmail.com>2018-10-13 14:52:37 +0200
commitf56a8da46a58c0a4a1ce2570038a7060de29a18c (patch)
treeeb2ae3a6b559401ec98a137984ca5bd1fe8e70a0 /src/core/crypto/partition_data_manager.h
parentpartition_data_manager: Take VirtualFile by const reference in constructor (diff)
downloadyuzu-f56a8da46a58c0a4a1ce2570038a7060de29a18c.tar
yuzu-f56a8da46a58c0a4a1ce2570038a7060de29a18c.tar.gz
yuzu-f56a8da46a58c0a4a1ce2570038a7060de29a18c.tar.bz2
yuzu-f56a8da46a58c0a4a1ce2570038a7060de29a18c.tar.lz
yuzu-f56a8da46a58c0a4a1ce2570038a7060de29a18c.tar.xz
yuzu-f56a8da46a58c0a4a1ce2570038a7060de29a18c.tar.zst
yuzu-f56a8da46a58c0a4a1ce2570038a7060de29a18c.zip
Diffstat (limited to 'src/core/crypto/partition_data_manager.h')
-rw-r--r--src/core/crypto/partition_data_manager.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/crypto/partition_data_manager.h b/src/core/crypto/partition_data_manager.h
index c5a492a92..7c9c4410a 100644
--- a/src/core/crypto/partition_data_manager.h
+++ b/src/core/crypto/partition_data_manager.h
@@ -22,6 +22,11 @@ enum class Package2Type {
class PartitionDataManager {
public:
static const u8 MAX_KEYBLOB_SOURCE_HASH;
+ static constexpr std::size_t NUM_ENCRYPTED_KEYBLOBS = 32;
+ static constexpr std::size_t ENCRYPTED_KEYBLOB_SIZE = 0xB0;
+
+ using EncryptedKeyBlob = std::array<u8, ENCRYPTED_KEYBLOB_SIZE>;
+ using EncryptedKeyBlobs = std::array<EncryptedKeyBlob, NUM_ENCRYPTED_KEYBLOBS>;
explicit PartitionDataManager(const FileSys::VirtualDir& sysdata_dir);
~PartitionDataManager();
@@ -29,8 +34,8 @@ public:
// BOOT0
bool HasBoot0() const;
FileSys::VirtualFile GetBoot0Raw() const;
- std::array<u8, 0xB0> GetEncryptedKeyblob(u8 index) const;
- std::array<std::array<u8, 0xB0>, 0x20> GetEncryptedKeyblobs() const;
+ EncryptedKeyBlob GetEncryptedKeyblob(u8 index) const;
+ EncryptedKeyBlobs GetEncryptedKeyblobs() const;
std::vector<u8> GetSecureMonitor() const;
std::array<u8, 0x10> GetPackage2KeySource() const;
std::array<u8, 0x10> GetAESKekGenerationSource() const;