mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-03 08:49:03 +00:00
46 lines
896 B
C++
46 lines
896 B
C++
#pragma once
|
|
#include "types.h"
|
|
#include "KeyBag.h"
|
|
#include <tc/Optional.h>
|
|
#include <ntd/n3ds/crr.h>
|
|
|
|
namespace ctrtool {
|
|
|
|
class CrrProcess
|
|
{
|
|
public:
|
|
CrrProcess();
|
|
|
|
void setInputStream(const std::shared_ptr<tc::io::IStream>& input_stream);
|
|
void setKeyBag(const ctrtool::KeyBag& key_bag);
|
|
void setCliOutputMode(bool show_info);
|
|
void setVerboseMode(bool verbose);
|
|
void setVerifyMode(bool verify);
|
|
|
|
void process();
|
|
private:
|
|
std::string mModuleLabel;
|
|
|
|
std::shared_ptr<tc::io::IStream> mInputStream;
|
|
ctrtool::KeyBag mKeyBag;
|
|
bool mShowInfo;
|
|
bool mVerbose;
|
|
bool mVerify;
|
|
|
|
ntd::n3ds::CrrHeader mHeader;
|
|
ntd::n3ds::CrrBodyHeader mBodyHeader;
|
|
tc::ByteData mCrrData;
|
|
|
|
byte_t mValidCertificateSignature;
|
|
byte_t mValidBodySignature;
|
|
byte_t mValidUniqueId;
|
|
|
|
void importData();
|
|
void verifyData();
|
|
void printData();
|
|
|
|
// string utils
|
|
std::string getValidString(byte_t validstate);
|
|
};
|
|
|
|
} |