2018-06-22 12:54:35 +00:00
|
|
|
#pragma once
|
|
|
|
#include <string>
|
2018-06-24 04:46:11 +00:00
|
|
|
#include <fnd/ISerialisable.h>
|
2018-06-22 12:54:35 +00:00
|
|
|
#include <es/sign.h>
|
|
|
|
|
|
|
|
namespace es
|
|
|
|
{
|
|
|
|
class SignatureBlock
|
2018-06-24 04:46:11 +00:00
|
|
|
: public fnd::ISerialisable
|
2018-06-22 12:54:35 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
SignatureBlock();
|
|
|
|
SignatureBlock(const SignatureBlock& other);
|
|
|
|
|
|
|
|
void operator=(const SignatureBlock& other);
|
|
|
|
bool operator==(const SignatureBlock& other) const;
|
|
|
|
bool operator!=(const SignatureBlock& other) const;
|
|
|
|
|
2018-06-24 04:46:11 +00:00
|
|
|
// export/import binary
|
|
|
|
void toBytes();
|
|
|
|
void fromBytes(const byte_t* src, size_t size);
|
2018-06-24 15:01:16 +00:00
|
|
|
const fnd::Vec<byte_t>& getBytes() const;
|
2018-06-22 12:54:35 +00:00
|
|
|
|
2018-06-24 04:46:11 +00:00
|
|
|
// variables
|
2018-06-22 12:54:35 +00:00
|
|
|
void clear();
|
|
|
|
|
|
|
|
es::sign::SignType getSignType() const;
|
|
|
|
void setSignType(es::sign::SignType type);
|
|
|
|
|
|
|
|
bool isLittleEndian() const;
|
|
|
|
void setLittleEndian(bool isLE);
|
|
|
|
|
2018-06-24 04:46:11 +00:00
|
|
|
const fnd::Vec<byte_t>& getSignature() const;
|
|
|
|
void setSignature(const fnd::Vec<byte_t>& signature);
|
2018-06-22 12:54:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
const std::string kModuleName = "SIGNATURE_BLOCK";
|
|
|
|
|
|
|
|
// raw binary
|
2018-06-24 04:46:11 +00:00
|
|
|
fnd::Vec<byte_t> mRawBinary;
|
2018-06-22 12:54:35 +00:00
|
|
|
|
|
|
|
// variables
|
|
|
|
es::sign::SignType mSignType;
|
|
|
|
bool mIsLittleEndian;
|
2018-06-24 04:46:11 +00:00
|
|
|
fnd::Vec<byte_t> mSignature;
|
2018-06-22 12:54:35 +00:00
|
|
|
};
|
|
|
|
}
|