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_CalcChecksum*</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">MATH_CalcChecksum* <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
21u8  MATH_CalcChecksum8( const void* data, u32 dataLength );
22u16 MATH_CalcChecksum16( const void* data, u32 dataLength );
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">data</font></strong></em></TD>
30      <TD width="670">Pointer to the input data.</TD>
31    </TR>
32    <TR>
33      <TD width="176"><em><strong><font face="Courier New">dataLength</font></strong></em></TD>
34      <TD width="670">Size of the input data.</TD>
35    </TR>
36  </table>
37<h2>Return Values</h2>
38<p>Various checksum values</p>
39<H2>Description</H2>
40<P>Computes both the 8-bit Checksum and 16-bit Checksum in one call. 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).
41</P>
42<h2>See Also</h2>
43<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>
44<H2>Revision History</H2>
45<P>
462005/04/12 Initial version.
47</P>
48<hr><p>CONFIDENTIAL</p></body>
49</html>
50