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
|
|
|
|
{
|
|
|
|
namespace hierarchicalintegrity
|
|
|
|
{
|
2018-06-29 07:10:10 +00:00
|
|
|
static const uint32_t kStructMagic = _MAKE_STRUCT_MAGIC_U32("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-26 04:23:40 +00:00
|
|
|
le_uint32_t st_magic;
|
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)
|
|
|
|
}
|