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_CRC*Update</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">MATH_CRC*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/crc.h&gt;
20
21void MATH_CRC8Update( const <A href="MATHCRCTable.html">MATHCRC8Table</A> *table, <A href="MATHCRCContext.html">MATHCRC8Context</A> *context, const void* input, u32 length );
22void MATH_CRC16Update( const <A href="MATHCRCTable.html">MATHCRC16Table</A> *table, <A href="MATHCRCContext.html">MATHCRC16Context</A> *context, const void* input, u32 length );
23void MATH_CRC16CCITTUpdate( const <A href="MATHCRCTable.html">MATHCRC16Table</A> *table, <A href="MATHCRCContext.html">MATHCRC16Context</A> *context, const void* input, u32 length );
24void MATH_CRC32Update( const <A href="MATHCRCTable.html">MATHCRC32Table</A> *table, <A href="MATHCRCContext.html">MATHCRC32Context</A> *context, const void* input, u32 length );
25void MATH_CRC32POSIXUpdate( const <A href="MATHCRCTable.html">MATHCRC32Table</A> *table, <A href="MATHCRCContext.html">MATHCRC32Context</A> *context, const void* input, u32 length );
26</CODE></PRE>
27  </dd>
28</dl><h2>Arguments</h2>
29
30<table border="1" width="100%">
31    <TR>
32      <TD width="176"><em><strong><font face="Courier New">table</font></strong></em></TD>
33      <TD width="670">Pointer to the tables used to compute CRCs.</TD>
34    </TR>
35    <TR>
36      <TD width="176"><em><strong><font face="Courier New">context</font></strong></em></TD>
37      <TD width="670">Pointer to the context structure used for various CRC calculations.</TD>
38    </TR>
39    <TR>
40      <TD width="176"><em><strong><font face="Courier New">input</font></strong></em></TD>
41      <TD width="670">Pointer to the input data.</TD>
42    </TR>
43    <TR>
44      <TD width="176"><em><strong><font face="Courier New">length</font></strong></em></TD>
45      <TD width="670">Size of the input data.</TD>
46    </TR>
47  </table>
48<h2>Return Values</h2>
49<p>None.</p>
50<H2>Description</H2>
51<P>Updates the various CRC hash values based on the input data. You must first initialize the <CODE>table</CODE> argument using a <CODE><A href="MATH_CRCInitTable.html">MATH_CRC*InitTable</A></CODE> function and the <CODE>context</CODE> argument using a <CODE><A href="MATH_CRCInit.html">MATH_CRC*Init</A></CODE> function. Call this function as many times as needed, and then use a <CODE><A href="MATH_CRCGetHash.html">MATH_CRC*GetHash</A></CODE> function to get the hash value. Any size and alignment position can be used for the input data.<BR> CRC-8 is an algorithm that finds an 8-bit hash value.<BR> CRC-16 and CRC-16/CCITT are algorithms that find 16-bit hash values.<BR> CRC-32 and CRC-32/POSIX are algorithms that find 32-bit hash values. CRC-16 is the algorithm used in the ARC and LHA compression programs. One restriction is that the hash value does not change when a <code>0</code> byte is appended to the top. CRC-16/CCITT is an algorithm that is used in many data link layer standards as a FCS (Frame Check Sequence). It is defined in the x.25 standard of the CCITT (Comite Consultatif International Telegraphique et Telephonique). CRC-32 is an algorithm used in compression programs, such as PKZIP, and image formats, such as PNG. For details, see ISO 3309 and RFC 2083. CRC-32/POSIX is an algorithm used in the cksum command, which is included in POSIX-compliant Unix. It is defined in POSIX 1003.2. With the <code>cksum</code> command, CRC is taken after the file length is appended to the end of the input file.
52</P>
53<h2>See Also</h2>
54<P><a href="MATH_CRCInitTable.html"><code>MATH_CRC*InitTable</code></a>, <a href="MATH_CRCInit.html"><code>MATH_CRC*Init</code></a>, <a href="MATH_CRCGetHash.html"><code>MATH_CRC*GetHash</code></a></P>
55<H2>Revision History</H2>
56<P>
572005/04/12 Initial version.
58</P>
59<hr><p>CONFIDENTIAL</p></body>
60</html>
61