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 name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<TITLE>SVC_SHA1GetHash</TITLE> 8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">SVC_SHA1GetHash <IMG src="../image/BPT.gif" align="middle"><IMG src="../image/TWL.gif" align="middle"></H1> 12<H2>Syntax</H2> 13<DL> 14 <DD> 15<PRE><CODE>#include <twl/os/common/systemCall.h></CODE></PRE> 16 <PRE><CODE>void SVC_SHA1GetHash( <A href="SVC_SHA1Init.html">SVCSHA1Context</A> *context, 17void* md );</CODE></PRE> 18</DL> 19<H2>Arguments</H2> 20<TABLE border="1"> 21 <TBODY> 22 <TR> 23<TD><SPAN class="argument">context</SPAN></TD> 24<TD>Pointer to the context structure used for SHA-1 generation.</TD> 25 </TR> 26 <TR> 27<TD><SPAN class="argument">md</SPAN></TD> 28<TD>Pointer to the memory location that holds the message digest value.</TD> 29 </TR> 30 </TBODY> 31</TABLE> 32<H2>Return Values</H2> 33<P>None.</P> 34<H2>Description</H2> 35<P>Gets the digest value using SHA-1.</P> 36<P>Use the <A href="SVC_SHA1Init.html"><CODE>SVC_SHA1Init</CODE></A> function to initialize the <SPAN class="argument">context</SPAN> argument and then use the <A href="SVC_SHA1Update.html"><CODE>SVC_SHA1Update</CODE></A> function to provide the input data.</P> 37<P>The length of the generated message digest value is 160 bits, or <CODE>SVC_SHA1_DIGEST_SIZE</CODE> (= 20) bytes. Use the <SPAN class="argument">md</SPAN> argument to pass an area that can store a value of this size.</P> 38<P>This function rewrites <SPAN class="argument">context</SPAN> internally, so you cannot continue to use the same context with the <A href="SVC_SHA1Update.html"><CODE>SVC_SHA1Update</CODE></A> function.</P> 39<P>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).</P> 40<H2>See Also</H2> 41<P><A href="SVC_SHA1Init.html"><CODE>SVC_SHA1Init</CODE></A><BR> <A href="SVC_SHA1Update.html"><CODE>SVC_SHA1Update</CODE></A></P> 42<H2>Revision History</H2> 43<P>2007/10/22 Changed the order of the arguments.<BR> 2007/10/19 Initial version.</P> 44<hr><p>CONFIDENTIAL</p></body> 45</HTML>