This file provides CRC-32 and CRC-16 methods. More...
#include <sbgCommon.h>
Go to the source code of this file.
Typedefs | |
typedef uint16 | SbgCrc16 |
typedef uint32 | SbgCrc32 |
Functions | |
uint16 | sbgCrc16Compute (const void *pData, size_t dataSize) |
SBG_INLINE uint16 | sbgCrc16Get (const SbgCrc16 *pInstance) |
void | sbgCrc16Initialize (SbgCrc16 *pInstance) |
void | sbgCrc16Update (SbgCrc16 *pInstance, const void *pData, size_t dataSize) |
uint32 | sbgCrc32Compute (const void *pData, size_t dataSize) |
SBG_INLINE uint32 | sbgCrc32Get (const SbgCrc32 *pInstance) |
void | sbgCrc32Initialize (SbgCrc32 *pInstance) |
void | sbgCrc32Update (SbgCrc32 *pInstance, const void *pData, size_t dataSize) |
This file provides CRC-32 and CRC-16 methods.
Copyright (C) 2007-2013, SBG Systems SAS. All rights reserved.
This source code is intended for use only by SBG Systems SAS and those that have explicit written permission to use it from SBG Systems SAS.
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
Definition in file sbgCrc.h.
uint16 sbgCrc16Compute | ( | const void * | pData, |
size_t | dataSize | ||
) |
SBG_INLINE uint16 sbgCrc16Get | ( | const SbgCrc16 * | pInstance | ) |
void sbgCrc16Initialize | ( | SbgCrc16 * | pInstance | ) |
void sbgCrc16Update | ( | SbgCrc16 * | pInstance, |
const void * | pData, | ||
size_t | dataSize | ||
) |
uint32 sbgCrc32Compute | ( | const void * | pData, |
size_t | dataSize | ||
) |
Compute a 32 Bit CRC using an Ethernet polynome. Warning: the buffer size should be at least 4 bytes long.
[in] | pData | Read only pointer on the data buffer to compute CRC on. |
[in] | dataSize | Data size in bytes of the buffer, has to be greater or equals to 4. |
SBG_INLINE uint32 sbgCrc32Get | ( | const SbgCrc32 * | pInstance | ) |
void sbgCrc32Initialize | ( | SbgCrc32 * | pInstance | ) |
void sbgCrc32Update | ( | SbgCrc32 * | pInstance, |
const void * | pData, | ||
size_t | dataSize | ||
) |
Compute a 32 bit CRC using an Ethernet polynome. Warning: the buffer size should be at least 4 bytes long.
[in] | pInstance | Read only pointer on a valid Crc32 object. |
[in] | pData | Read only pointer on the data buffer to compute CRC on. |
[in] | dataSize | Data size in bytes of the buffer, has to be greater or equals to 4. |