FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Hash Class Reference

Static Public Member Functions

static std::uint32_t crc32 (std::size_t n, const void *buffer)
 Computes the CRC-32 checksum of a buffer. More...
 
static std::uint32_t crc32_update (std::size_t n, const void *buffer, std::uint32_t crc_in)
 Updates a CRC-32 checksum of a buffer. More...
 

Detailed Description

Definition at line 13 of file hash.hpp.

Member Function Documentation

◆ crc32()

std::uint32_t FEAT::Hash::crc32 ( std::size_t  n,
const void *  buffer 
)
static

Computes the CRC-32 checksum of a buffer.

The polynomial for the CRC table is 0x04C11DB7.

Parameters
[in]nThe length of the input buffer in bytes.
[in]bufferA transient pointer to the buffer that the checksum is to be computed for
Returns
The CRC-32 checksum of the input buffer.

Definition at line 55 of file hash.cpp.

References crc32_update().

◆ crc32_update()

std::uint32_t FEAT::Hash::crc32_update ( std::size_t  n,
const void *  buffer,
std::uint32_t  crc_in 
)
static

Updates a CRC-32 checksum of a buffer.

The polynomial for the CRC table is 0x04C11DB7.

Parameters
[in]nThe length of the input buffer in bytes.
[in]bufferA transient pointer to the buffer that the checksum is to be updated for
Returns
The updated raw CRC-32 checksum of the input buffer.

Definition at line 47 of file hash.cpp.

Referenced by crc32().


The documentation for this class was generated from the following files: