ChecksumBuilder
ChecksumBuilder

A class used to simply perform checksums on data

Variables
m_bytes
ByteStream m_bytes

The ByteStream that holds the data that needs checksummed

Functions
append_uint8
void append_uint8(
uint8 value
)

Appends a 1-byte unsigned integer to the ChecksumBuilder

Parameters
value
uint8

The uint8 to be added to the ChecksumBuilder

append_uint16
void append_uint16(
uint16 value
)

Appends a 2-byte unsigned integer to the ChecksumBuilder

Parameters
value
uint16

The uint16 to be added to the ChecksumBuilder

append_uint32
void append_uint32(
uint32 value
)

Appends a 4-byte unsigned integer to the ChecksumBuilder

Parameters
value
uint32

The uint32 to be added to the ChecksumBuilder

appendBytes
void appendBytes(
const Bytes &bytes
)

Appends a vector of bytes to the end of the current ChecksumBuilder

Parameters
bytes
const Bytes&

The bytes to be appended to the ChecksumBuilder

appendByteStream
void appendByteStream(
const ByteStream &otherStream
)

Appends the entire contents of a ByteStream to the end of the current ChecksumBuilder

Parameters
otherStream
const ByteStream&

The ByteStream to be appended to the current ChecksumBuilder

simpleChecksum
uint16 simpleChecksum() const

Returns a simple checksum of all the bytes in the ChecksumBuilder

Returns The simple checksum of all the bytes in the ChecksumBuilder

fletcherChecksum
uint16 fletcherChecksum() const

Returns the Fletcher checksum of all the bytes in the ChecksumBuilder

Returns The Fletcher checksum of all the bytes in the ChecksumBuilder