mirror of
https://github.com/jakcron/nstool
synced 2024-11-15 10:16:42 +00:00
48 lines
No EOL
1 KiB
C++
48 lines
No EOL
1 KiB
C++
#pragma once
|
|
#include <string>
|
|
#include <fnd/ISerialisable.h>
|
|
#include <es/sign.h>
|
|
|
|
namespace es
|
|
{
|
|
class SignatureBlock
|
|
: public fnd::ISerialisable
|
|
{
|
|
public:
|
|
SignatureBlock();
|
|
SignatureBlock(const SignatureBlock& other);
|
|
|
|
void operator=(const SignatureBlock& other);
|
|
bool operator==(const SignatureBlock& other) const;
|
|
bool operator!=(const SignatureBlock& other) const;
|
|
|
|
// export/import binary
|
|
void toBytes();
|
|
void fromBytes(const byte_t* src, size_t size);
|
|
const fnd::Vec<byte_t>& getBytes() const;
|
|
|
|
// variables
|
|
void clear();
|
|
|
|
es::sign::SignatureId getSignType() const;
|
|
void setSignType(es::sign::SignatureId type);
|
|
|
|
bool isLittleEndian() const;
|
|
void setLittleEndian(bool isLE);
|
|
|
|
const fnd::Vec<byte_t>& getSignature() const;
|
|
void setSignature(const fnd::Vec<byte_t>& signature);
|
|
|
|
|
|
private:
|
|
const std::string kModuleName = "SIGNATURE_BLOCK";
|
|
|
|
// raw binary
|
|
fnd::Vec<byte_t> mRawBinary;
|
|
|
|
// variables
|
|
es::sign::SignatureId mSignType;
|
|
bool mIsLittleEndian;
|
|
fnd::Vec<byte_t> mSignature;
|
|
};
|
|
} |