Class that can be used to compute a CRC-32 checksum for a data stream.
More...
#include <src/main/decaf/util/zip/CRC32.h>
|
| CRC32 () |
|
virtual | ~CRC32 () |
|
virtual long long | getValue () const |
|
virtual void | reset () |
| Reset the checksum to its initial value.
|
|
virtual void | update (const std::vector< unsigned char > &buffer) |
| Updates the current checksum with the specified vector of bytes.
|
|
virtual void | update (const std::vector< unsigned char > &buffer, int offset, int length) |
| Updates the current checksum with the specified array of bytes.
|
|
virtual void | update (const unsigned char *buffer, int size, int offset, int length) |
| Updates the current checksum with the specified array of bytes.
|
|
virtual void | update (int byte) |
| Updates the current checksum with the specified byte value.
|
|
virtual | ~Checksum () |
|
Class that can be used to compute a CRC-32 checksum for a data stream.
- Since
- 1.0
◆ CRC32()
decaf::util::zip::CRC32::CRC32 |
( |
| ) |
|
◆ ~CRC32()
virtual decaf::util::zip::CRC32::~CRC32 |
( |
| ) |
|
|
virtual |
◆ getValue()
virtual long long decaf::util::zip::CRC32::getValue |
( |
| ) |
const |
|
virtual |
◆ reset()
virtual void decaf::util::zip::CRC32::reset |
( |
| ) |
|
|
virtual |
◆ update() [1/4]
virtual void decaf::util::zip::CRC32::update |
( |
const std::vector< unsigned char > & | buffer | ) |
|
|
virtual |
Updates the current checksum with the specified vector of bytes.
- Parameters
-
buffer | The buffer to read the updated bytes from. |
Implements decaf::util::zip::Checksum.
◆ update() [2/4]
virtual void decaf::util::zip::CRC32::update |
( |
const std::vector< unsigned char > & | buffer, |
|
|
int | offset, |
|
|
int | length ) |
|
virtual |
Updates the current checksum with the specified array of bytes.
- Parameters
-
buffer | The buffer to read the updated bytes from. |
offset | The position in the buffer to start reading. |
length | The amount of data to read from the byte buffer. |
- Exceptions
-
IndexOutOfBoundsException | if offset + length > size of the buffer. |
Implements decaf::util::zip::Checksum.
◆ update() [3/4]
virtual void decaf::util::zip::CRC32::update |
( |
const unsigned char * | buffer, |
|
|
int | size, |
|
|
int | offset, |
|
|
int | length ) |
|
virtual |
Updates the current checksum with the specified array of bytes.
- Parameters
-
buffer | The buffer to read the updated bytes from. |
size | The size of the passed buffer. |
offset | The position in the buffer to start reading. |
length | The amount of data to read from the byte buffer. |
- Exceptions
-
NullPointerException | if the passed buffer is NULL. |
IndexOutOfBoundsException | if offset + length > size of the buffer. |
Implements decaf::util::zip::Checksum.
◆ update() [4/4]
virtual void decaf::util::zip::CRC32::update |
( |
int | byte | ) |
|
|
virtual |
Updates the current checksum with the specified byte value.
- Parameters
-
byte | The byte value to update the current Checksum with (0..255). |
Implements decaf::util::zip::Checksum.
The documentation for this class was generated from the following file: