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>NETCalcSHA256</title> 7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 8</head> 9<body> 10 11<h1 align="left">NETCalcSHA256</h1> 12<h2>Syntax</h2> 13 14<dl> 15 <dd> 16 <PRE><CODE>#include <revolution/net.h> 17 18inline void NETCalcSHA256(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-256 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-256. This is a utility function that successively calls the <A href="NETSHA256Init.html"><CODE>NETSHA256Init</CODE></A>, <A href="NETSHA256Update.html"><CODE>NETSHA256Update</CODE></A>, and <A href="NETSHA256GetDigest.html"><CODE>NETSHA256GetDigest</CODE></A> functions.</p> 42<p>Any size and alignment position can be used for the input data.</p> 43<p> 44To store the hash length to be generated, be sure to pass a sufficient memory region in the <CODE>digest</CODE> argument. Because the context structure is allocated internally, make sure that you have sufficient stack space when calling the function. For details, see the "SHA-256" section of the <a href="hash_overview.html">hash algorithm</a>. 45</p> 46<h2>See Also</h2> 47<P><A href="NETCalcSHA256.html"><CODE>NETCalcSHA256</CODE></A></P> 48<H2>Revision History</H2> 49<P> 502008/05/07 Initial version.<BR> 51</P> 52<hr><p>CONFIDENTIAL</p></body> 53</html> 54