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

43 lines
954 B
C
Raw Normal View History

#pragma once
#include <string>
#include <nx/AciBinary.h>
#include <crypto/rsa.h>
namespace nx
{
class AcidBinary :
public AciBinary
{
public:
AcidBinary();
AcidBinary(const AcidBinary& other);
2018-06-24 08:18:54 +00:00
void operator=(const AcidBinary& other);
bool operator==(const AcidBinary& other) const;
bool operator!=(const AcidBinary& other) const;
// export/import binary
2018-06-24 08:18:54 +00:00
void toBytes();
void signBinary(const crypto::rsa::sRsa2048Key& key);
2018-06-24 08:18:54 +00:00
void fromBytes(const byte_t* bytes, size_t len);
2018-04-21 09:19:12 +00:00
void verifyBinary(const crypto::rsa::sRsa2048Key& key) const;
2018-06-24 08:18:54 +00:00
const fnd::Vec<byte_t>& getBytes() const;
// variables
virtual void clear();
2017-07-18 14:17:32 +00:00
const crypto::rsa::sRsa2048Key& getNcaHeader2RsaKey() const;
void setNcaHeader2RsaKey(const crypto::rsa::sRsa2048Key& key);
private:
const std::string kModuleName = "ACID_BINARY";
// raw binary
2018-06-24 08:18:54 +00:00
fnd::Vec<byte_t> mRawBinary;
// variables
crypto::rsa::sRsa2048Key mEmbeddedPublicKey;
};
}