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>AES_Rand</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">AES_Rand <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 <twl/aes.h> 20 21<a href="../api/AESResult.html">AESResult</a> AES_Rand( void* p, u32 size ); 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>p</TH> 31 <TD>Pointer to the buffer to which to write a random number.</TD> 32 </TR> 33 <TR> 34 <TH>size</TH> 35 <TD>Size of the buffer to which to write the random number.</TD> 36 </TR> 37 </TBODY> 38</TABLE> 39 40<h2>Return Values</h2> 41<p> 42Returns <CODE>AES_RESULT_SUCCESS</CODE> if the random number was generated successfully. Any other return values indicate an error. 43</p> 44 45<H2>Description</H2> 46<P> 47Generates a pseudo-random number using the AES algorithm.<br> 48</p> 49<P> 50For the following reasons, this function is not well-suited for generating standard random numbers. It should only be used for special purposes. 51</p> 52<ul> 53<li>It is slow. 54<li>Its random numbers are not reproducible. 55<li>It cannot be used while AES operations that contain <CODE>AES_Rand()</CODE> are running. 56</ul> 57<P> 58Use the <a href="../../math/rand/MATH_Rand.html">MATH Random Number Generator</a> in order to generate standard random numbers. 59</p> 60 61<h2>See Also</h2> 62<p><CODE></CODE></p> 63 64<H2>Revision History</H2> 65<P> 662007/12/25 Initial version. 67</P> 68<hr><p>CONFIDENTIAL</p></body> 69</html> 70