2018-05-19 03:57:40 +00:00
|
|
|
#pragma once
|
|
|
|
#include <fnd/types.h>
|
2018-06-03 07:41:56 +00:00
|
|
|
#include <nx/macro.h>
|
2018-05-19 03:57:40 +00:00
|
|
|
|
|
|
|
namespace nx
|
|
|
|
{
|
2018-05-20 01:19:41 +00:00
|
|
|
// Also known to the public as IVFC
|
2018-05-19 03:57:40 +00:00
|
|
|
namespace hierarchicalintegrity
|
|
|
|
{
|
2018-06-03 07:41:56 +00:00
|
|
|
static const uint32_t kStructSig = _MAKE_STRUCT_SIGNATURE("IVFC");
|
2018-05-20 13:57:38 +00:00
|
|
|
static const uint32_t kRomfsTypeId = 0x20000;
|
|
|
|
static const size_t kDefaultLayerNum = 6;
|
|
|
|
static const size_t kHeaderAlignLen = 0x20;
|
2018-05-19 03:57:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#pragma pack(push,1)
|
|
|
|
struct sHierarchicalIntegrityHeader
|
|
|
|
{
|
2018-06-03 07:41:56 +00:00
|
|
|
le_uint32_t signature;
|
2018-05-19 03:57:40 +00:00
|
|
|
le_uint32_t type_id;
|
|
|
|
le_uint32_t master_hash_size;
|
|
|
|
le_uint32_t layer_num;
|
2018-05-20 13:57:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct sHierarchicalIntegrityLayerInfo // sizeof(0x18)
|
|
|
|
{
|
|
|
|
le_uint64_t offset;
|
|
|
|
le_uint64_t size;
|
|
|
|
le_uint32_t block_size;
|
|
|
|
byte_t reserved[4];
|
2018-05-19 03:57:40 +00:00
|
|
|
};
|
|
|
|
#pragma pack(pop)
|
|
|
|
}
|