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_SHA1Init</TITLE> 8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">SVC_SHA1Init <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_SHA1Init( SVCSHA1Context* context );</CODE></PRE> 17<P><CODE>typedef struct SVCSHA1Context<BR> {<BR> 18 u32 h0,h1,h2,h3,h4;<BR> 19 u32 Nl,Nh;<BR> 20 u32 data[16];<BR> 21 int num;<BR> 22 void (*sha_block)(struct SVCSHA1Context *c, const u8 *W, int num);<BR> }<BR> SVCSHA1Context;</CODE></P> 23 24</DL> 25 26<H2>Arguments</H2> 27<TABLE border="1"> 28 <TBODY> 29 <TR> 30 <TD><B><I>context</I></B></TD> 31 <TD>Pointer to the context structure to initialize. This structure is used for SHA-1 generation.</TD> 32 </TR> 33 </TBODY> 34</TABLE> 35<H2>Return Values</H2> 36<P>None.</P> 37<H2>Description</H2> 38<P>Initializes the structure to use when calculating SHA-1. Make sure this function is called before using the <CODE><A href="SVC_SHA1Update.html">SVC_SHA1Update</A></CODE> or <CODE><A href="SVC_SHA1GetHash.html">SVC_SHA1GetHash</A></CODE> functions.</P> 39<P><B><I>context</I></B> is the context structure to initialize for SHA-1 generation. You can reapply this function to a context structure that is already initialized. In this case, it will return the context structure to its initial state.</P> 40<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> 41<H2>See Also</H2> 42<P><CODE><A href="SVC_SHA1Update.html">SVC_SHA1Update</A></CODE>, <CODE><A href="SVC_SHA1GetHash.html">SVC_SHA1GetHash</A></CODE></P> 43<H2>Revision History</H2> 44<P>2007/10/19 Initial version.</P> 45<hr><p>CONFIDENTIAL</p></body> 46</HTML>