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_SHA1GetHash</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">MATH_SHA1GetHash<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 <nitro/math/dgt.h> 20 21static inline void MATH_SHA1GetHash( <A href="MATHSHA1Context.html">MATHSHA1Context</A> *context, void* digest ); 22</CODE></PRE> 23 </dd> 24</dl><h2>Arguments</h2> 25 26<table border="1" width="100%"> 27 <TR> 28 <TD width="176"><em><strong><font face="Courier New">context</font></strong></em></TD> 29 <TD width="670">Pointer to the context structure used for SHA-1 generation.</TD> 30 </TR> 31 <TR> 32 <TD width="176"><em><strong><font face="Courier New">digest</font></strong></em></TD> 33 <TD width="670">Pointer to the memory location that holds the message digest value.</TD> 34 </TR> 35 </table> 36<h2>Return Values</h2> 37<p>None.</p> 38<H2>Description</H2> 39<P>This function gets the digest value using SHA-1. You must use the <CODE><A href="MATH_SHA1Init.html">MATH_SHA1Init</A></CODE> function to initialize the <CODE>context</CODE> argument and then use the <CODE><A href="MATH_SHA1Update.html">MATH_SHA1Update</A></CODE> function to provide the input data.<BR>The length of the generated message digest value is 160 bits, or <nobr><code>MATH_SHA1_DIGEST_SIZE (= 20)</code></nobr> 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_SHA1Update.html">MATH_SHA1Update</A></CODE> function. <BR>SHA-1 is an algorithm to find the message digest value. For details, see RFC (Request For Comments) 3174, which is published by IETF (The Internet Engineering Task Force). 40</P> 41<h2>See Also</h2> 42<P><a href="MATH_SHA1Init.html"><code>MATH_SHA1Init</code></a>, <a href="MATH_SHA1Update.html"><code>MATH_SHA1Update</code></a></P> 43<H2>Revision History</H2> 44<P> 452005/07/11 Added to Description. <BR> 2005/04/12 Changed function name.<BR>2005/04/01 Initial version. 46</P> 47<hr><p>CONFIDENTIAL</p></body> 48</html> 49