libxcks
0.1.0.1
|
Computes the CRC-64 (ECMA 182 standard) from a byte stream. More...
#include <crc64.hpp>
Public Member Functions | |
CRC64 () | |
Default constructor. More... | |
void | reset () override |
Resets the CRC64 to initial value. More... | |
uint64_t | getUint64Value () const |
Returns the CRC64 value. More... | |
std::string | toString (const bool hexInUpperCase=false) const override |
Returns the CRC64 value in a string. More... | |
uint8_t * | getValue (uint8_t *buffer) const override |
Returns the CRC64 value in the first 8 bytes of the given address. More... | |
size_t | getSize () const override |
Returns the minimal size to allocate in memory to store the checksum with the getValue(buffer) method. More... | |
void | update (const uint8_t *buf, size_t len) override |
Updates the CRC64 with specified array of bytes. More... | |
std::string | getName () const override |
Returns the name of the checksum or the hash algorithm. More... | |
ArrayString | getAltNames () const override |
Returns the alternative names of the CRC64 checksum algorithm. More... | |
ChecksumAlgoId | getID () const override |
Returns an unique identifier for the checksum or the hash algorithm. More... | |
Public Member Functions inherited from libxcks::Checksum | |
virtual | ~Checksum () |
Destructor. More... | |
Static Public Member Functions | |
static std::string | getChecksumName () |
Returns the name of the checksum algorithm. More... | |
static constexpr ChecksumAlgoId | getIdentifier () |
Returns an unique identifier for the checksum algorithm. More... | |
static ArrayString | getAlternativeNames () |
Returns the alternative names of the CRC64 checksum algorithm. More... | |
static Checksum * | getNewInstance () |
Gets a new instance of this class. More... | |
Static Public Member Functions inherited from libxcks::Checksum | |
static ArrayString | getAlternativeNames () |
Returns the alternative name(s) of the checksum or the hash algorithm. More... | |
Protected Attributes | |
uint64_t | crc64 |
The current CRC64 value. More... | |
Static Protected Attributes | |
static const uint64_t | crc_table [256] |
Table used to compute the CRC64 value. More... | |
Additional Inherited Members | |
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... | |
Computes the CRC-64 (ECMA 182 standard) from a byte stream.
This class is written with the code found in LibCRC.
Using this class in very simple:
Use the update method to provide to the class the bytes for computing the checksum.
The CRC-64 checksum value can be gotten by the getUint64Value method which puts the CRC64 checksum value in an unsigned 64 bits integer.
The CRC64 checksum computing can be reseted by the reset method.
|
static |
|
inlineoverridevirtual |
Returns the alternative names of the CRC64 checksum algorithm.
Reimplemented from libxcks::Checksum.
|
inlinestatic |
|
inlineoverridevirtual |
Returns an unique identifier for the checksum or the hash algorithm.
Implements libxcks::Checksum.
|
inlinestaticconstexpr |
Returns an unique identifier for the checksum algorithm.
|
inlineoverridevirtual |
Returns the name of the checksum or the hash algorithm.
Implements libxcks::Checksum.
|
inlinestatic |
|
inlineoverridevirtual |
Returns the minimal size to allocate in memory to store the checksum with the getValue(buffer) method.
Implements libxcks::Checksum.
uint64_t libxcks::CRC64::getUint64Value | ( | ) | const |
|
overridevirtual |
Returns the CRC64 value in the first 8 bytes of the given address.
buffer | The buffer where the CRC64 value will be stored. |
Implements libxcks::Checksum.
|
overridevirtual |
Resets the CRC64 to initial value.
Implements libxcks::ChecksumEx.
|
overridevirtual |
Returns the CRC64 value in a string.
hexInUpperCase | If true the hexadecimal letters will be in uppercase. |
Reimplemented from libxcks::ChecksumEx.
|
overridevirtual |
Updates the CRC64 with specified array of bytes.
buf | The byte array to update the CRC64 with. |
len | The number of bytes to use for the update. |
Implements libxcks::Checksum.
|
protected |
|
staticprotected |