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_RC4Fast</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">CRYPTO_RC4Fast <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_RC4Fast(const void* key, u32 key_len, void* data, u32 data_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>key</TH>
31      <TD>Pointer to the byte sequence for the encryption/decryption key used with the RC4 algorithm.</TD>
32    </TR>
33    <TR>
34      <TH>key_len</TH>
35      <TD>Length of the key specified by <EM><STRONG><CODE>key</CODE></STRONG></EM>. The length of the key must be 16 bytes or less; longer lengths are truncated to 16 bytes.</TD>
36    </TR>
37    <TR>
38      <TH>data</TH>
39      <TD>Pointer to the target data to encrypt/decrypt with the RC4 algorithm.</TD>
40    </TR>
41    <TR>
42      <TH>data_len</TH>
43      <TD>Specifies the length of the data specified by <EM><STRONG><CODE>data</CODE></STRONG></EM>.</TD>
44    </TR>
45  </TBODY>
46</TABLE>
47
48<h2>Return Values</h2>
49<p>
50None.
51</p>
52
53<H2>Description</H2>
54<P>
55	Performs encryption/decryption using the RC4 shared key encryption algorithm. The same function is used for both encryption and decryption in the RC4 algorithm.<BR>
56	Data stored within the data argument is directly processed and overwritten with the converted results.<BR>
57	This function is defined as an inline function that calls the <code><a href="CRYPTO_RC4FastInit.html">CRYPTO_RC4FastInit</a></code> and <code><a href="CRYPTO_RC4FastEncrypt.html">CRYPTO_RC4FastEncrypt</a></code> functions sequentially.
58</P>
59<P>
60	The <code><a href="CRYPTO_RC4.html">CRYPTO_RC4</a></code> and <code>CRYPTO_RC4Fast</code> functions are the same, except that the <CODE>CRYPTO_RC4Fast</CODE> function is faster and requires more stack memory.<BR>
61	The <code><a href="CRYPTO_RC4.html">CRYPTO_RC4</a></code> function gets the <code>CRYPTORC4Context</code> structure from the stack, which requires a minimum of 260 bytes.<BR>
62	The <code>CRYPTO_RC4Fast</code> function gets the <code>CRYPTORC4FastContext</code> structure, which requires a minimum of 1032 bytes from the stack.<BR>
63	With regard to speed, <code>CRYPTO_RC4Fast</code> processes data at approximately 1.5 times the normal speed when the data is sufficiently large in size.<BR>
64</P>
65<P>
66	For detailed information on using the RC4 algorithm, see <A href="../overview/about_RC4.html">Overview of Encryption Using RC4 Algorithm</A>.
67</P>
68
69<h2>See Also</h2>
70<p><CODE><A href="CRYPTO_RC4FastEncrypt.html">CRYPTO_RC4FastEncrypt</A>, <A href="CRYPTO_RC4FastInit.html">CRYPTO_RC4FastInit</A></CODE></p>
71
72<H2>Revision History</H2>
73<P>
742008/02/25 Initial version.
75</P>
76<hr><p>CONFIDENTIAL</p></body>
77</html>
78