nstool/lib/libpki/include/nn/pki/SignatureBlock.h

51 lines
1.1 KiB
C
Raw Permalink Normal View History

2018-10-27 07:06:33 +00:00
#pragma once
#include <string>
#include <fnd/IByteModel.h>
#include <nn/pki/sign.h>
namespace nn
{
namespace pki
{
class SignatureBlock
: public fnd::IByteModel
{
public:
SignatureBlock();
SignatureBlock(const SignatureBlock& other);
void operator=(const SignatureBlock& other);
bool operator==(const SignatureBlock& other) const;
bool operator!=(const SignatureBlock& other) const;
// IByteModel
void toBytes();
void fromBytes(const byte_t* src, size_t size);
const fnd::Vec<byte_t>& getBytes() const;
// variables
void clear();
pki::sign::SignatureId getSignType() const;
void setSignType(pki::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
pki::sign::SignatureId mSignType;
bool mIsLittleEndian;
fnd::Vec<byte_t> mSignature;
};
}
2018-06-22 12:54:35 +00:00
}