Class that can be used to compute a CRC-32 checksum for a data stream.
More...
#include <src/main/decaf/util/zip/CRC32.h>
Public Member Functions |
| 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 () |
Detailed Description
Class that can be used to compute a CRC-32 checksum for a data stream.
- Since
- 1.0
Constructor & Destructor Documentation
decaf::util::zip::CRC32::CRC32 |
( |
| ) |
|
virtual decaf::util::zip::CRC32::~CRC32 |
( |
| ) |
|
|
virtual |
Member Function Documentation
virtual long long decaf::util::zip::CRC32::getValue |
( |
| ) |
const |
|
virtual |
virtual void decaf::util::zip::CRC32::reset |
( |
| ) |
|
|
virtual |
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.
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.
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.
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: