mirror of
https://github.com/jakcron/nstool
synced 2024-11-15 02:06:40 +00:00
[nx] Typos
This commit is contained in:
parent
28f92b78c8
commit
b7175f7f5c
2 changed files with 5 additions and 5 deletions
|
@ -60,10 +60,10 @@ void nx::NcaHeader::toBytes()
|
|||
switch(mFormatVersion)
|
||||
{
|
||||
case (NCA2_FORMAT):
|
||||
hdr->st_magic = nca::kNca2StMagic;
|
||||
hdr->st_magic = nca::kNca2StructMagic;
|
||||
break;
|
||||
case (NCA3_FORMAT):
|
||||
hdr->st_magic = nca::kNca3StMagic;
|
||||
hdr->st_magic = nca::kNca3StructMagic;
|
||||
break;
|
||||
default:
|
||||
throw fnd::Exception(kModuleName, "Unsupported format version");
|
||||
|
@ -124,10 +124,10 @@ void nx::NcaHeader::fromBytes(const byte_t * data, size_t len)
|
|||
|
||||
switch(hdr->st_magic.get())
|
||||
{
|
||||
case (nca::kNca2StMagic) :
|
||||
case (nca::kNca2StructMagic) :
|
||||
mFormatVersion = NCA2_FORMAT;
|
||||
break;
|
||||
case (nca::kNca3StMagic) :
|
||||
case (nca::kNca3StructMagic) :
|
||||
mFormatVersion = NCA3_FORMAT;
|
||||
break;
|
||||
throw fnd::Exception(kModuleName, "NCA header corrupt");
|
||||
|
|
|
@ -9,7 +9,7 @@ void nx::NcaUtils::decryptNcaHeader(const byte_t* src, byte_t* dst, const crypto
|
|||
crypto::aes::AesXtsMakeTweak(tweak, 1);
|
||||
crypto::aes::AesXtsDecryptSector(src + sectorToOffset(1), nx::nca::kSectorSize, key.key[0], key.key[1], tweak, raw_hdr);
|
||||
|
||||
bool useNca2SectorIndex = ((nx::sNcaHeader*)(raw_hdr))->st_magic.get() == nx::nca::kNca2StMagic;
|
||||
bool useNca2SectorIndex = ((nx::sNcaHeader*)(raw_hdr))->st_magic.get() == nx::nca::kNca2StructMagic;
|
||||
|
||||
// decrypt whole header
|
||||
for (size_t i = 0; i < nx::nca::kHeaderSectorNum; i++)
|
||||
|
|
Loading…
Reference in a new issue