MATHChecksum*Context

Syntax

#include <nitro/math/checksum.h>
typedef u8 MATHChecksum8Context; typedef u16 MATHChecksum16Context;

Elements

Do not access the elements of this structure directly.

Description

The context structure used to calculate checksums. Initialize it using a MATH_Checksum*Init function, provide the input data with a MATH_Checksum*Update function, and get the hash value with a MATH_Checksum*GetHash function. 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).

See Also

MATH_Checksum*Init, MATH_Checksum*Update, MATH_Checksum*GetHash

Revision History

2005/04/12 Initial version.


CONFIDENTIAL