Program Listing for File checksum.h

Return to documentation for file (rcsw/utils/checksum.h)

#pragma once

/*******************************************************************************
 * Includes
 ******************************************************************************/
#include "rcsw/rcsw.h"

/*******************************************************************************
 * Function Prototypes
 ******************************************************************************/
BEGIN_C_DECLS

RCSW_API uint8_t xchks8(const uint8_t * buf,
                        size_t n_bytes,
                        uint8_t seed) RCSW_PURE;

RCSW_API uint16_t xchks16(const uint16_t * buf,
                          size_t n_bytes,
                          uint16_t seed) RCSW_PURE;

RCSW_API uint32_t xchks32(const uint32_t * buf,
                          size_t n_bytes,
                          uint32_t seed) RCSW_PURE;

RCSW_API uint8_t achks8(const uint8_t * buf,
                        size_t n_bytes,
                        uint8_t seed) RCSW_PURE;

RCSW_API uint16_t achks16(const uint16_t * buf,
                          size_t n_bytes,
                          uint16_t seed) RCSW_PURE;

RCSW_API uint32_t achks32(const uint32_t * buf,
                          size_t n_bytes,
                          uint32_t seed) RCSW_PURE;

RCSW_API uint16_t achks8_16(const uint8_t * buf,
                            size_t n_bytes,
                            uint8_t seed) RCSW_PURE;

RCSW_API uint32_t crc32_brown(const uint8_t * buf, uint32_t crc, size_t size);

RCSW_API void crc32_ethl_init(void);

RCSW_API uint32_t crc32_ethl(const uint8_t * buf, size_t n_bytes);

RCSW_API uint32_t crc32_eth(const uint8_t * buf, size_t n_bytes) RCSW_PURE;

END_C_DECLS