#include <nitro/math/checksum.h>
static inline u8 MATH_Checksum8GetHash( MATHChecksum8Context *context );
static inline u16 MATH_Checksum16GetHash( MATHChecksum16Context *context );
context |
Pointer to the context structure used for generating Checksum*. |
None.
Calculates hash values using checksum algorithms. You must use MATH_Checksum*Init
to initialize the 'context' argument and then use MATH_Checksum*Update
to provide the input data. 8-bit Checksum is an algorithm to find the 8-bit hash value. It computes the one's complement of the one's complement sum in 8-bit units. 16-bit Checksum is an algorithm to find the 16-bit hash value. It computes the one's complement of the one's complement sum in 16-bit units. 16-bit Checksum returns the same value as IP Checksum or Internet Checksum, which are used with IP, UDP and TCP protocols. For details on Internet Checksum, see RFC (Request For Comments) 1071, which is published by IETF (The Internet Engineering Task Force).
MATH_Checksum*Init
, MATH_Checksum*Update
04/12/2005 Initial version.