mirror of
https://github.com/jakcron/nstool
synced 2024-11-27 07:59:28 +00:00
41 lines
No EOL
960 B
C++
41 lines
No EOL
960 B
C++
#pragma once
|
|
#include <string>
|
|
#include <fnd/types.h>
|
|
#include <fnd/IFile.h>
|
|
#include <nx/NpdmBinary.h>
|
|
|
|
#include "nstool.h"
|
|
|
|
class NpdmProcess
|
|
{
|
|
public:
|
|
NpdmProcess();
|
|
|
|
void process();
|
|
|
|
void setInputFile(fnd::IFile& reader);
|
|
void setInputFileOffset(size_t offset);
|
|
void setKeyset(const sKeyset* keyset);
|
|
void setCliOutputMode(CliOutputType type);
|
|
void setVerifyMode(bool verify);
|
|
|
|
private:
|
|
const std::string kModuleName = "NpdmProcess";
|
|
|
|
fnd::IFile* mReader;
|
|
size_t mOffset;
|
|
const sKeyset* mKeyset;
|
|
CliOutputType mCliOutputType;
|
|
bool mVerify;
|
|
|
|
nx::NpdmBinary mNpdm;
|
|
|
|
void validateAcidSignature(const nx::AcidBinary& acid);
|
|
void validateAciFromAcid(const nx::AciBinary& aci, const nx::AcidBinary& acid);
|
|
|
|
void displayNpdmHeader(const nx::NpdmHeader& hdr);
|
|
void displayAciHdr(const nx::AciHeader& aci);
|
|
void displayFac(const nx::FacBinary& fac);
|
|
void displaySac(const nx::SacBinary& sac);
|
|
void displayKernelCap(const nx::KcBinary& kern);
|
|
}; |