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*GetHash</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">MATH_Checksum*GetHash <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
21static inline u8 MATH_Checksum8GetHash( <A href="MATHChecksumContext.html">MATHChecksum8Context</A> *context );
22static inline u16 MATH_Checksum16GetHash( <A href="MATHChecksumContext.html">MATHChecksum16Context</A> *context );
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"><em><strong><code>context</code></strong></em>&nbsp;&nbsp;</font></strong></em></TD>
30      <TD width="670">Pointer to the context structure used for generating Checksum*.</TD>
31    </TR>
32  </table>
33<h2>Return Values</h2>
34<p>None.</p>
35<H2>Description</H2>
36<P>Calculates hash values using checksum algorithms. You must use a <CODE><A href="MATH_ChecksumInit.html">MATH_Checksum*Init</A></CODE> function to initialize the <CODE>context</CODE> argument and then use a <CODE><A href="MATH_ChecksumUpdate.html">MATH_Checksum*Update</A></CODE> function to provide the input data.<BR>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).
37</P>
38<h2>See Also</h2>
39<P><a href="MATH_ChecksumInit.html"><code>MATH_Checksum*Init</code></a>, <a href="MATH_ChecksumUpdate.html"><code>MATH_Checksum*Update</code></a></P>
40<H2>Revision History</H2>
41<P>
422005/04/12 Initial version.
43</P>
44<hr><p>CONFIDENTIAL</p></body>
45</html>
46