nstool/lib/libnx/include/nx/NcaUtils.h

14 lines
449 B
C
Raw Normal View History

2018-04-15 02:40:22 +00:00
#pragma once
#include <nx/nca.h>
namespace nx
{
class NcaUtils
{
public:
static inline size_t sectorToOffset(size_t sector_index) { return sector_index * nx::nca::kSectorSize; }
static void decryptNcaHeader(const byte_t* src, byte_t* dst, const crypto::aes::sAesXts128Key& key);
static byte_t getMasterKeyRevisionFromKeyGeneration(byte_t key_generation);
2018-05-01 05:21:28 +00:00
static void getNcaPartitionAesCtr(const nx::sNcaFsHeader* hdr, byte_t* ctr);
2018-04-15 02:40:22 +00:00
};
}