1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>MATHChecksum*Context</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">MATHChecksum*Context <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></H1> 15<H2>Syntax</H2> 16 17<dl> 18 <dd> 19<PRE> 20<CODE>#include <nitro/math/checksum.h><BR> 21typedef u8 MATHChecksum8Context; 22typedef u16 MATHChecksum16Context; 23</CODE></PRE> 24 </dd> 25</dl> 26<H2>Elements</H2> 27<P>Do not access the elements of this structure directly.</P> 28<H2>Description</H2> 29<P>The context structure used to calculate checksums. Initialize it using a <CODE><A href="MATH_ChecksumInit.html">MATH_Checksum*Init</A></CODE> function, provide the input data with a <CODE><A href="MATH_ChecksumUpdate.html">MATH_Checksum*Update</A></CODE> function, and get the hash value with a <CODE><A href="MATH_ChecksumGetHash.html">MATH_Checksum*GetHash</A></CODE> 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). 30</P> 31 32<h2>See Also</h2> 33<P><a href="MATH_ChecksumInit.html"><code>MATH_Checksum*Init</code></a>, <a href="MATH_ChecksumUpdate.html"><code>MATH_Checksum*Update</code></a>, <a href="MATH_ChecksumGetHash.html"><code>MATH_Checksum*GetHash</code></a></P> 34<H2>Revision History</H2> 35<P> 362005/04/12 Initial version. 37</P> 38<hr><p>CONFIDENTIAL</p></body> 39</html> 40