1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META http-equiv="Content-Style-Type" content="text/css">
6<title>NETCalcSHA1</title>
7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
8</head>
9<body>
10
11<h1 align="left">NETCalcSHA1</h1>
12<h2>C Specification</h2>
13
14<dl>
15  <dd>
16<PRE><CODE>#include &lt;revolution/net.h&gt;
17
18inline void NETCalcSHA1(void* digest, const void* input, u32 length);
19
20</CODE></PRE>
21  </dd>
22</dl><h2>Arguments</h2>
23
24<table border="1" width="100%">
25    <TR>
26<TD width="176"><em><strong><font face="Courier New">digest</font></strong></em></TD>
27<TD width="670">Pointer to the memory location that holds the calculated SHA-1 value.</TD>
28    </TR>
29    <TR>
30<TD width="176"><em><strong><font face="Courier New">data</font></strong></em></TD>
31<TD width="670">Pointer to the input data</TD>
32    </TR>
33    <TR>
34<TD width="176"><em><strong><font face="Courier New">dataLength</font></strong></em></TD>
35<TD width="670">Size of the input data</TD>
36    </TR>
37  </table>
38<h2>Return Values</h2>
39<p>None.</p>
40<H2>Description</H2>
41<P>This function calculates SHA-1. This is a utility function that successively calls <CODE><A href="NETSHA1Init.html">NETSHA1Init</A></CODE>, <CODE><A href="NETSHA1Update.html">NETSHA1Update</A></CODE>, and <CODE><A href="NETSHA1GetDigest.html">NETSHA1GetDigest</A></CODE>.</p>
42<p>Any size and alignment position can be used for the input data.</p>
43<p>
44Be sure to pass enough memory region in the digest argument to store the hash length to be generated.<br>Since the context structure is allocated internally, make sure that you have sufficient stack when calling the function. For details, see the &quot;SHA-1&quot; section of the <a href="hash_overview.html">hash algorithm</a>.
45</p>
46<h2>See Also</h2>
47<P><A href="NETCalcSHA1.html"><CODE>NETCalcSHA1</CODE></A></P>
48<H2>Revision History</H2>
49<P>
502007/02/15 Corrected incorrect links.<BR> 2006/09/01 Initial version.<BR>
51</P>
52<hr><p>CONFIDENTIAL</p></body>
53</html>
54