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 http-equiv="Content-Style-Type" content="text/css"> 7<title>MATH_SHA256GetHash</title> 8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 9</head> 10 11<body> 12 13<h1 align="left">MATH_SHA256GetHash <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></H1> 14<H2>Syntax</H2> 15 16<dl> 17 <dd> 18 <PRE><CODE>#include <nitro/math/dgt.h> 19 20static inline void MATH_SHA256GetHash( <A href="MATHSHA256Context.html">MATHSHA256Context</A> *context, void* digest ); 21</CODE></PRE> 22 </dd> 23</dl><h2>Arguments</h2> 24 25<table border="1" width="100%"> 26 <TR> 27 <TD width="176"><em><strong><font face="Courier New">context</font></strong></em></TD> 28 <TD width="670">Pointer to the context structure used for SHA-256 generation.</TD> 29 </TR> 30 <TR> 31 <TD width="176"><em><strong><font face="Courier New">digest</font></strong></em></TD> 32 <TD width="670">Pointer to the memory location that holds the message digest value.</TD> 33 </TR> 34 </table> 35<h2>Return Values</h2> 36<p>None.</p> 37<H2>Description</H2> 38<P>This function gets the digest value using SHA-256. You must use the <CODE><A href="MATH_SHA256Init.html">MATH_SHA256Init</A></CODE> function to initialize the <CODE>context</CODE> argument and then use the <CODE><A href="MATH_SHA256Update.html">MATH_SHA256Update</A></CODE> function to provide the input data.<BR>The length of the generated message digest value is 256 bits or <CODE>MATH_SHA256_DIGEST_SIZE</CODE> (32) bytes. Use the "digest" argument to pass an area that can store a value of this size. This function rewrites <CODE>context</CODE> internally, so you cannot continue to use the same context with the <CODE><A href="MATH_SHA256Update.html">MATH_SHA256Update</A></CODE> function. <BR>SHA-256 is an algorithm to find the message digest value. For details, refer to the Federal Information Processing Standard, FIPS PUB 180-2. 39</P> 40<h2>See Also</h2> 41<P><CODE><A href="MATH_SHA256Init.html">MATH_SHA256Init</A>, <A href="MATH_SHA256Update.html">MATH_SHA256Update</A></CODE></P> 42<H2>Revision History</H2> 43<P> 442008/05/23 Initial version. 45</P> 46<hr><p>CONFIDENTIAL</p></body> 47</html> 48