mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
DiscIO/VolumeWii: Decouple "is encrypted" from "is hashed"
Needed for the next commit. NFS disc images are hashed but not encrypted. While we're at it, also get rid of SupportsIntegrityCheck. It does the same thing as old IsEncryptedAndHashed and new HasWiiHashes.
This commit is contained in:
@ -60,7 +60,8 @@ public:
|
||||
VolumeWii(std::unique_ptr<BlobReader> reader);
|
||||
~VolumeWii();
|
||||
bool Read(u64 offset, u64 length, u8* buffer, const Partition& partition) const override;
|
||||
bool IsEncryptedAndHashed() const override;
|
||||
bool HasWiiHashes() const override;
|
||||
bool HasWiiEncryption() const override;
|
||||
std::vector<Partition> GetPartitions() const override;
|
||||
Partition GetGamePartition() const override;
|
||||
std::optional<u32> GetPartitionType(const Partition& partition) const override;
|
||||
@ -69,8 +70,8 @@ public:
|
||||
const IOS::ES::TMDReader& GetTMD(const Partition& partition) const override;
|
||||
const std::vector<u8>& GetCertificateChain(const Partition& partition) const override;
|
||||
const FileSystem* GetFileSystem(const Partition& partition) const override;
|
||||
static u64 EncryptedPartitionOffsetToRawOffset(u64 offset, const Partition& partition,
|
||||
u64 partition_data_offset);
|
||||
static u64 OffsetInHashedPartitionToRawOffset(u64 offset, const Partition& partition,
|
||||
u64 partition_data_offset);
|
||||
u64 PartitionOffsetToRawOffset(u64 offset, const Partition& partition) const override;
|
||||
std::string GetGameTDBID(const Partition& partition = PARTITION_NONE) const override;
|
||||
std::map<Language, std::string> GetLongNames() const override;
|
||||
@ -78,7 +79,6 @@ public:
|
||||
|
||||
Platform GetVolumeType() const override;
|
||||
bool IsDatelDisc() const override;
|
||||
bool SupportsIntegrityCheck() const override { return m_encrypted; }
|
||||
bool CheckH3TableIntegrity(const Partition& partition) const override;
|
||||
bool CheckBlockIntegrity(u64 block_index, const u8* encrypted_data,
|
||||
const Partition& partition) const override;
|
||||
@ -128,7 +128,8 @@ private:
|
||||
std::unique_ptr<BlobReader> m_reader;
|
||||
std::map<Partition, PartitionDetails> m_partitions;
|
||||
Partition m_game_partition;
|
||||
bool m_encrypted;
|
||||
bool m_has_hashes;
|
||||
bool m_has_encryption;
|
||||
|
||||
mutable u64 m_last_decrypted_block;
|
||||
mutable u8 m_last_decrypted_block_data[BLOCK_DATA_SIZE]{};
|
||||
|
Reference in New Issue
Block a user