mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
introduce wrapper for SHA1 functionality
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Crypto/SHA1.h"
|
||||
#include "Common/IOFile.h"
|
||||
#include "Common/Swap.h"
|
||||
#include "DiscIO/Blob.h"
|
||||
@ -70,7 +71,6 @@ public:
|
||||
int compression_level, int chunk_size, CompressCB callback);
|
||||
|
||||
private:
|
||||
using SHA1 = std::array<u8, 20>;
|
||||
using WiiKey = std::array<u8, 16>;
|
||||
|
||||
// See docs/WiaAndRvz.md for details about the format
|
||||
@ -82,10 +82,10 @@ private:
|
||||
u32 version;
|
||||
u32 version_compatible;
|
||||
u32 header_2_size;
|
||||
SHA1 header_2_hash;
|
||||
Common::SHA1::Digest header_2_hash;
|
||||
u64 iso_file_size;
|
||||
u64 wia_file_size;
|
||||
SHA1 header_1_hash;
|
||||
Common::SHA1::Digest header_1_hash;
|
||||
};
|
||||
static_assert(sizeof(WIAHeader1) == 0x48, "Wrong size for WIA header 1");
|
||||
|
||||
@ -101,7 +101,7 @@ private:
|
||||
u32 number_of_partition_entries;
|
||||
u32 partition_entry_size;
|
||||
u64 partition_entries_offset;
|
||||
SHA1 partition_entries_hash;
|
||||
Common::SHA1::Digest partition_entries_hash;
|
||||
|
||||
u32 number_of_raw_data_entries;
|
||||
u64 raw_data_entries_offset;
|
||||
@ -161,7 +161,7 @@ private:
|
||||
struct HashExceptionEntry
|
||||
{
|
||||
u16 offset;
|
||||
SHA1 hash;
|
||||
Common::SHA1::Digest hash;
|
||||
};
|
||||
static_assert(sizeof(HashExceptionEntry) == 0x16, "Wrong size for WIA hash exception entry");
|
||||
#pragma pack(pop)
|
||||
|
Reference in New Issue
Block a user