mirror of
https://github.com/jakcron/nstool.git
synced 2024-12-23 03:05:27 +00:00
17 lines
478 B
C++
17 lines
478 B
C++
#pragma once
|
|
#include <nn/hac/nca.h>
|
|
|
|
namespace nn
|
|
{
|
|
namespace hac
|
|
{
|
|
class NcaUtils
|
|
{
|
|
public:
|
|
static inline size_t sectorToOffset(size_t sector_index) { return sector_index * nn::hac::nca::kSectorSize; }
|
|
static void decryptNcaHeader(const byte_t* src, byte_t* dst, const fnd::aes::sAesXts128Key& key);
|
|
static byte_t getMasterKeyRevisionFromKeyGeneration(byte_t key_generation);
|
|
static void getNcaPartitionAesCtr(const nn::hac::sNcaFsHeader* hdr, byte_t* ctr);
|
|
};
|
|
}
|
|
} |