Go to the source code of this file.
◆ SbgCrc16
◆ SbgCrc32
This file provides CRC-32 and CRC-16 methods.
\file sbgCrc.h
- Author
- SBG Systems (Raphael Siryani)
- Date
- 15 January 2013
Copyright Notice
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.
< Type used to compute a 32 bit Ethernet CRC. Type used to compute a 16 bit CRC.
Definition at line 38 of file sbgCrc.h.
◆ sbgCrc16Compute()
Compute a 32 Bit CRC using an the polynome 0x8408.
- Parameters
-
[in] | pData | Read only pointer on the data buffer to compute CRC on. |
[in] | dataSize | Data size in bytes of the buffer. |
- Returns
- The computed CRC.
Definition at line 253 of file sbgCrc.c.
◆ sbgCrc16Get()
Returns the computed 32 bit CRC value.
- Parameters
-
[in] | pInstance | Read only pointer on a valid Crc16 object. |
- Returns
- The computed CRC.
Definition at line 104 of file sbgCrc.h.
◆ sbgCrc16Initialize()
Initialize the 16 bit CRC computation system.
- Parameters
-
[in] | pInstance | Pointer on an allocated but non initialized Crc16 object. |
Definition at line 206 of file sbgCrc.c.
◆ sbgCrc16Update()
Compute a 16 bit CRC using an the polynome 0x8408.
- Parameters
-
[in] | pInstance | Read only pointer on a valid Crc16 object. |
[in] | pData | Read only pointer on the data buffer to compute CRC on. |
[in] | dataSize | Data size in bytes of the buffer. |
Definition at line 222 of file sbgCrc.c.
◆ sbgCrc32Compute()
Compute a 32 Bit CRC using an Ethernet polynome. Warning: the buffer size should be at least 4 bytes long.
- Parameters
-
[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. |
- Returns
- The computed CRC.
Definition at line 178 of file sbgCrc.c.
◆ sbgCrc32Get()
Returns the computed 32 bit CRC value.
- Parameters
-
[in] | pInstance | Read only pointer on a valid Crc32 object. |
- Returns
- The computed CRC.
Definition at line 67 of file sbgCrc.h.
◆ sbgCrc32Initialize()
Initialize the 32 bit CRC computation system.
- Parameters
-
[in] | pInstance | Pointer on an allocated but non initialized Crc32 object. |
Definition at line 91 of file sbgCrc.c.
◆ sbgCrc32Update()
Compute a 32 bit CRC using an Ethernet polynome. Warning: the buffer size should be at least 4 bytes long.
- Parameters
-
[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. |
Definition at line 108 of file sbgCrc.c.