2018-05-11 09:44:41 +00:00
|
|
|
#pragma once
|
|
|
|
#include <fnd/types.h>
|
|
|
|
#include <crypto/sha.h>
|
|
|
|
|
2018-08-07 07:17:51 +00:00
|
|
|
namespace nn
|
|
|
|
{
|
|
|
|
namespace hac
|
2018-05-11 09:44:41 +00:00
|
|
|
{
|
|
|
|
namespace hierarchicalsha256
|
|
|
|
{
|
2018-05-20 13:57:38 +00:00
|
|
|
static const size_t kDefaultLayerNum = 2;
|
|
|
|
static const size_t kMaxLayerNum = 2;
|
2018-05-11 09:44:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#pragma pack(push,1)
|
|
|
|
struct sHierarchicalSha256Header
|
|
|
|
{
|
|
|
|
crypto::sha::sSha256Hash master_hash;
|
|
|
|
le_uint32_t hash_block_size;
|
2018-05-19 03:57:40 +00:00
|
|
|
le_uint32_t layer_num;
|
2018-05-20 01:19:41 +00:00
|
|
|
struct sLayer
|
2018-05-11 09:44:41 +00:00
|
|
|
{
|
|
|
|
le_uint64_t offset;
|
|
|
|
le_uint64_t size;
|
2018-05-20 13:57:38 +00:00
|
|
|
} layer[hierarchicalsha256::kMaxLayerNum];
|
2018-05-11 09:44:41 +00:00
|
|
|
};
|
|
|
|
#pragma pack(pop)
|
|
|
|
}
|
2018-08-07 07:17:51 +00:00
|
|
|
}
|