This file provides CRC-32 and CRC-16 methods. More...
#include <sbgCommon.h>
Go to the source code of this file.
Typedefs | |
typedef uint16_t | SbgCrc16 |
typedef uint32_t | SbgCrc32 |
Functions | |
SBG_COMMON_LIB_API uint16_t | sbgCrc16Compute (const void *pData, size_t dataSize) |
SBG_INLINE uint16_t | sbgCrc16Get (const SbgCrc16 *pInstance) |
SBG_COMMON_LIB_API void | sbgCrc16Initialize (SbgCrc16 *pInstance) |
SBG_COMMON_LIB_API void | sbgCrc16Update (SbgCrc16 *pInstance, const void *pData, size_t dataSize) |
SBG_COMMON_LIB_API uint32_t | sbgCrc32Compute (const void *pData, size_t dataSize) |
SBG_INLINE uint32_t | sbgCrc32Get (const SbgCrc32 *pInstance) |
SBG_COMMON_LIB_API void | sbgCrc32Initialize (SbgCrc32 *pInstance) |
SBG_COMMON_LIB_API 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.
typedef uint32_t SbgCrc32 |
SBG_COMMON_LIB_API uint16_t sbgCrc16Compute | ( | const void * | pData, |
size_t | dataSize | ||
) |
SBG_INLINE uint16_t sbgCrc16Get | ( | const SbgCrc16 * | pInstance | ) |
SBG_COMMON_LIB_API void sbgCrc16Initialize | ( | SbgCrc16 * | pInstance | ) |
SBG_COMMON_LIB_API void sbgCrc16Update | ( | SbgCrc16 * | pInstance, |
const void * | pData, | ||
size_t | dataSize | ||
) |
SBG_COMMON_LIB_API uint32_t 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_t sbgCrc32Get | ( | const SbgCrc32 * | pInstance | ) |
SBG_COMMON_LIB_API void sbgCrc32Initialize | ( | SbgCrc32 * | pInstance | ) |
SBG_COMMON_LIB_API 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. |