2018-04-21 09:37:30 +00:00
|
|
|
#pragma once
|
2018-10-22 13:30:49 +00:00
|
|
|
#include <nn/hac/define/xci.h>
|
2018-04-21 09:37:30 +00:00
|
|
|
|
2018-08-07 07:17:51 +00:00
|
|
|
namespace nn
|
|
|
|
{
|
|
|
|
namespace hac
|
2018-04-21 09:37:30 +00:00
|
|
|
{
|
|
|
|
class XciUtils
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static inline uint64_t blockToAddr(uint32_t block) { return ((uint64_t)block) << 9; }
|
2018-08-07 07:17:51 +00:00
|
|
|
static void getXciHeaderAesIv(const nn::hac::sXciHeader* hdr, byte_t* iv);
|
2018-04-21 09:37:30 +00:00
|
|
|
static void decryptXciHeader(const byte_t* src, byte_t* dst, const byte_t* key);
|
|
|
|
};
|
2018-08-07 07:17:51 +00:00
|
|
|
}
|
2018-04-21 09:37:30 +00:00
|
|
|
}
|