libxcks
0.1.0.1
|
Computes a hash from a byte stream. More...
#include <libgcrypthash.hpp>
Public Member Functions | |
void | reset () override=0 |
Resets the checksum to initial value. More... | |
Public Member Functions inherited from libxcks::ChecksumEx | |
std::string | toString (const bool hexInUpperCase=false) const override |
Returns the hash value has a string. More... | |
Public Member Functions inherited from libxcks::Checksum | |
virtual | ~Checksum () |
Destructor. More... | |
virtual uint8_t * | getValue (uint8_t *buffer) const =0 |
Returns the checksum value in the first bytes of the given address. More... | |
virtual size_t | getSize () const =0 |
Returns the minimal size to allocate in memory to store the checksum with the getValue(buffer) method. More... | |
virtual void | update (const uint8_t *buf, size_t len)=0 |
Updates the checksum with specified array of bytes. More... | |
virtual std::string | getName () const =0 |
Returns the name of the checksum or the hash algorithm. More... | |
virtual ArrayString | getAltNames () const |
Returns the alternative name(s) of the checksum or the hash algorithm. More... | |
virtual ChecksumAlgoId | getID () const =0 |
Returns an unique identifier for the checksum or the hash algorithm. More... | |
Static Protected Member Functions | |
static uint32_t | rol (uint32_t x, int n) |
Rotate the 32 bit unsigned integer x by n bits left. More... | |
static uint32_t | ror (uint32_t x, int n) |
Rotate the 32 bit unsigned integer x by n bits right. More... | |
Static Protected Member Functions inherited from libxcks::ChecksumEx | |
static uint32_t | swapOnLE (const uint32_t value) |
Swaps bytes on little endian architectures. More... | |
static uint32_t | swapOnBE (const uint32_t value) |
Swaps bytes on big endian architectures. More... | |
static uint64_t | swapOnLE (const uint64_t value) |
Swaps bytes on little endian architectures. More... | |
static uint64_t | swapOnBE (const uint64_t value) |
Swaps bytes on big endian architectures. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from libxcks::Checksum | |
static ArrayString | getAlternativeNames () |
Returns the alternative name(s) of the checksum or the hash algorithm. More... | |
Computes a hash from a byte stream.
Adds some utilities to the ChecksumEx class for hashes which come from the Libgcrypt.
Definition at line 40 of file libgcrypthash.hpp.
|
overridepure virtual |
Resets the checksum to initial value.
Implements libxcks::ChecksumEx.
Implemented in libxcks::AbstractSHA512Impl, libxcks::AbstractSHA256Impl, libxcks::Tiger, libxcks::SHA512, libxcks::SHA384, libxcks::SHA256, libxcks::SHA224, libxcks::SHA1, libxcks::RIPEMD160, libxcks::MD5, and libxcks::MD4.
|
inlinestaticprotected |
Rotate the 32 bit unsigned integer x
by n
bits left.
x | The 32 bit unsigned integer to rotate to the left. |
n | The number of byte to rotate. |
Definition at line 50 of file libgcrypthash.hpp.
|
inlinestaticprotected |
Rotate the 32 bit unsigned integer x
by n
bits right.
x | The 32 bit unsigned integer to rotate to the right. |
n | The number of byte to rotate. |
Definition at line 62 of file libgcrypthash.hpp.