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>MATH_Checksum*Update</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">MATH_Checksum*Update <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><CODE>#include &lt;nitro/math/checksum.h&gt;
20
21void MATH_Checksum8Update( <A href="MATHChecksumContext.html">MATHChecksum8Context</A> *context, const void* input, u32 length );
22void MATH_Checksum16Update( <A href="MATHChecksumContext.html">MATHChecksum16Context</A> *context, const void* input, u32 length );
23</CODE></PRE>
24  </dd>
25</dl><h2>Arguments</h2>
26
27<table border="1" width="100%">
28    <TR>
29      <TD width="176"><em><strong><font face="Courier New">context</font></strong></em></TD>
30      <TD width="670">Pointer to the context structure for calculating checksums.</TD>
31    </TR>
32    <TR>
33      <TD width="176"><em><strong><font face="Courier New">input</font></strong></em></TD>
34      <TD width="670">Pointer to the input data.</TD>
35    </TR>
36    <TR>
37      <TD width="176"><em><strong><font face="Courier New">length</font></strong></em></TD>
38      <TD width="670">Size of the input data.</TD>
39    </TR>
40  </table>
41<h2>Return Values</h2>
42<p>None.</p>
43<H2>Description</H2>
44<P>Updates the checksum hash value based on the input data. You must initialize the <CODE>context</CODE> argument in advance using a <CODE><A href="MATH_ChecksumInit.html">MATH_Checksum*Init</A></CODE> function. Call this function as many times as needed, and then use a <CODE><A href="MATH_ChecksumGetHash.html">MATH_Checksum*GetHash</A></CODE> 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).
45</P>
46<h2>See Also</h2>
47<P><a href="MATH_ChecksumInit.html"><code>MATH_Checksum*Init</code></a>, <a href="MATH_ChecksumGetHash.html"><code>MATH_Checksum*GetHash</code></a></P>
48<H2>Revision History</H2>
49<P>
502005/04/12 Initial version.
51</P>
52<hr><p>CONFIDENTIAL</p></body>
53</html>
54