DiscIO: Use a struct for Wii hashes

This commit is contained in:
JosJuice
2020-01-30 21:29:11 +01:00
parent da9e0fb598
commit 432f342bc8
2 changed files with 36 additions and 25 deletions

View File

@ -46,6 +46,17 @@ public:
static constexpr u64 GROUP_DATA_SIZE = BLOCK_DATA_SIZE * BLOCKS_PER_GROUP;
static constexpr u64 GROUP_TOTAL_SIZE = GROUP_HEADER_SIZE + GROUP_DATA_SIZE;
struct HashBlock
{
u8 h0[31][SHA1_SIZE];
u8 padding_0[20];
u8 h1[8][SHA1_SIZE];
u8 padding_1[32];
u8 h2[8][SHA1_SIZE];
u8 padding_2[32];
};
static_assert(sizeof(HashBlock) == BLOCK_HEADER_SIZE);
VolumeWii(std::unique_ptr<BlobReader> reader);
~VolumeWii();
bool Read(u64 offset, u64 length, u8* buffer, const Partition& partition) const override;