

#include <nitro/math/checksum.h>
void MATH_Checksum8Update( MATHChecksum8Context *context, const void* input, u32 length );
void MATH_Checksum16Update( MATHChecksum16Context *context, const void* input, u32 length );
| context | Pointer to the context structure for calculating checksums. |
| input | Pointer to the input data. |
| length | Size of the input data. |
None.
Updates the checksum hash value based on the input data. You must initialize the context argument in advance using a MATH_Checksum*Init function. Call this function as many times as needed, and then use a MATH_Checksum*GetHash function to get the hash value. Any size and alignment position can be used for 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*GetHash
2005/04/12 Initial version.
CONFIDENTIAL