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_CalcSHA1</TITLE> 8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">SVC_CalcSHA1 <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_CalcSHA1( void* md, 17 const void* data, 18 unsigned int len );</CODE></PRE> 19</DL> 20<H2>Arguments</H2> 21<TABLE border="1"> 22 <TBODY> 23 <TR> 24 <TD><B><I>md</I></B></TD> 25 <TD>Pointer to the memory location that holds the calculated SHA-1 value.</TD> 26 </TR> 27 <TR> 28 <TD><B><I>data</I></B></TD> 29 <TD>Pointer to the input data.</TD> 30 </TR> 31 <TR> 32 <TD><B><I>len</I></B></TD> 33 <TD>Size of the input data.</TD> 34 </TR> 35 </TBODY> 36</TABLE> 37<H2>Return Values</H2> 38<P>None.</P> 39<H2>Description</H2> 40<P>Performs the SHA-1 calculations.</P> 41<P>This is a utility function that successively calls the <CODE><A href="SVC_SHA1Init.html">SVC_SHA1Init()</A></CODE>, <CODE><A href="SVC_SHA1Update.html">SVC_SHA1Update()</A></CODE>, and <CODE><A href="SVC_SHA1GetHash.html">SVC_SHA1GetHash()</A></CODE> functions. Internally, the <CODE><A href="SVC_SHA1Init.html">SVCSHA1Context</A></CODE> structure is allocated to the stack, so make sure you have sufficient stack space when calling the function.</P> 42<P>The length of the generated SHA-1 value is 160 bits, or <CODE>SVC_SHA1_DIGEST_SIZE</CODE> (= 20) bytes. Use the <B><I>md</I></B> argument to pass an area that can store a value of this size.</P> 43<P>Specify the input data using <B><I>data</I></B> and <B><I>len</I></B>. Any size and alignment position can be used.</P> 44<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> 45<H2>See Also</H2> 46<P><A href="SVC_SHA1Init.html"><CODE>SVC_SHA1Init</CODE></A><CODE>, <A href="SVC_SHA1Update.html">SVC_SHA1Update</A>, <A href="SVC_SHA1GetHash.html">SVC_SHA1GetHash</A></CODE></P> 47<H2>Revision History</H2> 48<P>2007/10/19 Initial version.</P> 49<hr><p>CONFIDENTIAL</p></body> 50</HTML>