24 #ifndef INC_CHECKSUM_HPP_BA2B9BF9_F9EA_43FB_8766_A19F518D1864
25 #define INC_CHECKSUM_HPP_BA2B9BF9_F9EA_43FB_8766_A19F518D1864
74 virtual std::string
toString(
const bool hexInUpperCase =
false)
const = 0;
85 virtual uint8_t*
getValue(uint8_t* buffer)
const = 0;
102 virtual void update(
const uint8_t* buf,
size_t len) = 0;
Computes a checksum from a byte stream.
virtual ~Checksum()
Destructor.
virtual std::string getName() const =0
Returns the name of the checksum or the hash algorithm.
static ArrayString getAlternativeNames()
Returns the alternative name(s) of the checksum or the hash algorithm.
virtual ArrayString getAltNames() const
Returns the alternative name(s) of the checksum or the hash algorithm.
virtual ChecksumAlgoId getID() const =0
Returns an unique identifier for the checksum or the hash algorithm.
virtual std::string toString(const bool hexInUpperCase=false) const =0
Returns the checksum value in a string.
virtual size_t getSize() const =0
Returns the minimal size to allocate in memory to store the checksum with the getValue(buffer) metho...
virtual void reset()=0
Resets the checksum to initial value.
virtual void update(const uint8_t *buf, size_t len)=0
Updates the checksum with specified array of bytes.
virtual uint8_t * getValue(uint8_t *buffer) const =0
Returns the checksum value in the first bytes of the given address.
OS dependent exports defines.
Common types for libxcks.
ChecksumAlgoId
Ids of algorithms of checksums.
std::vector< std::string > ArrayString
Array of strings.