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 7.0.0.0 for Windows">
7<META http-equiv="Content-Style-Type" content="text/css">
8<title>CRYPTO_RC4FastInit</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">CRYPTO_RC4FastInit <IMG src="../../image/NTR.gif" width="23" height="12" border="0" align="middle"><IMG src="../../image/TWL.gif" width="23" height="12" border="0" align="middle"></h1>
15<h2>Syntax</h2>
16
17<dl>
18  <dd>
19  <pre><CODE>#include &lt;nitro/crypto.h&gt;
20
21void CRYPTO_RC4FastInit(<a href="CRYPTORC4FastContext.html">CRYPTORC4FastContext</a>* context, const void* key, u32 key_len);
22</CODE></pre>
23</dd>
24</dl>
25
26<h2>Arguments</h2>
27<TABLE border="1" width="100%" class="arguments">
28  <TBODY>
29    <TR>
30<TH>context</TH>
31<TD>Specifies the context structure where the RC4 key information and so on is kept.</TD>
32    </TR>
33    <TR>
34<TH>key</TH>
35<TD>Pointer to the byte sequence for the encryption/decryption key used with the RC4 algorithm.</TD>
36    </TR>
37    <TR>
38<TH>key_len</TH>
39<TD>Length of the key specified by <SPAN class="argument">key</SPAN>. The length of the key must be 16 bytes or less; longer lengths are truncated to 16 bytes.</TD>
40    </TR>
41  </TBODY>
42</TABLE>
43
44<h2>Return Values</h2>
45<p>
46None.
47</p>
48
49<H2>Description</H2>
50<p>
51Initializes the RC4 algorithm encryption structures and sets the encryption/decryption key.
52</p>
53<p>
54This function is called internally when performing operations with <a href="CRYPTO_RC4Fast.html"><CODE>CRYPTO_RC4Fast</CODE></a>, so it does not need to be called.
55</p>
56<P>
57The <CODE>CRYPTO_RC4*</CODE> and <CODE>CRYPTO_RC4Fast*</CODE> functions are the same except that the <CODE>CRYPTO_RC4Fast*</CODE> functions are faster and require more stack memory. The <CODE>CRYPTORC4Context</CODE> structure used by the <CODE>CRYPTO_RC4*</CODE> functions is 260 bytes, and the <CODE>CRYPTORC4FastContext</CODE> structure used by the <code>CRYPTO_RC4Fast*</code> functions is 1032 bytes.<br>With regard to speed, <a href="CRYPTO_RC4FastEncrypt.html"><CODE>CRYPTO_RC4FastEncrypt</CODE></a> processes data at approximately 1.5 times the normal processing speed when the data is sufficiently large in size.
58</P>
59
60<h2>See Also</h2>
61<p><A href="CRYPTO_RC4FastEncrypt.html"><CODE>CRYPTO_RC4FastEncrypt</CODE></A><BR> <A href="CRYPTO_RC4Fast.html"><CODE>CRYPTO_RC4Fast</CODE></A><BR> <A href="CRYPTO_RC4Init.html"><CODE>CRYPTO_RC4Init</CODE></A></p>
62
63<H2>Revision History</H2>
64<P>
652008/02/25 Initial version.
66</P>
67<hr><p>CONFIDENTIAL</p></body>
68</html>
69