56
56
declares the following:
59
<dl><dt><b><a name='l2h-89'><tt class='function'>add</tt></a></b>(<var>string, entropy</var>)
59
<dl><dt><b><a name='l2h-92'><tt class='function'>add</tt></a></b>(<var>string, entropy</var>)
61
61
Mix bytes from <var>string</var> into the PRNG state. The <var>entropy</var> argument is
62
62
(the lower bound of) an estimate of how much randomness is contained in
63
<var>string</var>, measured in bytes. For more information, see e.g. <a class="rfc" name="rfcref-1840"
63
<var>string</var>, measured in bytes. For more information, see e.g. <a class="rfc" name="rfcref-1878"
64
64
href="http://www.ietf.org/rfc/rfc1750.txt">RFC 1750</a>.
68
<dl><dt><b><a name='l2h-90'><tt class='function'>egd</tt></a></b>(<var>path</var><big>[</big><var>, bytes</var><big>]</big>)
68
<dl><dt><b><a name='l2h-93'><tt class='function'>egd</tt></a></b>(<var>path</var><big>[</big><var>, bytes</var><big>]</big>)
70
70
Query the Entropy Gathering Daemon<A NAME="tex2html2"
71
HREF="#foot945"><SUP>2</SUP></A> on socket <var>path</var> for <var>bytes</var>
71
HREF="#foot972"><SUP>2</SUP></A> on socket <var>path</var> for <var>bytes</var>
72
72
bytes of random data and and uses <tt class="function">add</tt> to seed the PRNG. The default
73
73
value of <var>bytes</var> is 255.
77
<dl><dt><b><a name='l2h-91'><tt class='function'>load_file</tt></a></b>(<var>path</var><big>[</big><var>, bytes</var><big>]</big>)
77
<dl><dt><b><a name='l2h-94'><tt class='function'>load_file</tt></a></b>(<var>path</var><big>[</big><var>, bytes</var><big>]</big>)
79
79
Read <var>bytes</var> bytes (or all of it, if <var>bytes</var> is negative) of data from
80
80
the file <var>path</var> to seed the PRNG. The default value of <var>bytes</var> is -1.
84
<dl><dt><b><a name='l2h-92'><tt class='function'>screen</tt></a></b>()
84
<dl><dt><b><a name='l2h-95'><tt class='function'>screen</tt></a></b>()
86
86
Add the current contents of the screen to the PRNG state.
87
87
Availability: Windows.
91
<dl><dt><b><a name='l2h-93'><tt class='function'>seed</tt></a></b>(<var>string</var>)
91
<dl><dt><b><a name='l2h-96'><tt class='function'>seed</tt></a></b>(<var>string</var>)
93
93
This is equivalent to calling <tt class="function">add</tt> with <var>entropy</var> as the length
98
<dl><dt><b><a name='l2h-94'><tt class='function'>status</tt></a></b>()
98
<dl><dt><b><a name='l2h-97'><tt class='function'>status</tt></a></b>()
100
100
Returns true if the PRNG has been seeded with enough data, and false otherwise.
104
<dl><dt><b><a name='l2h-95'><tt class='function'>write_file</tt></a></b>(<var>path</var>)
104
<dl><dt><b><a name='l2h-98'><tt class='function'>write_file</tt></a></b>(<var>path</var>)
106
106
Write a number of random bytes (currently 1024) to the file <var>path</var>. This
107
107
file can then be used with <tt class="function">load_file</tt> to seed the PRNG again.
111
111
<BR><HR><H4>Footnotes</H4>
113
<DT><A NAME="foot945">... Daemon</A><A
113
<DT><A NAME="foot972">... Daemon</A><A
114
114
href="openssl-rand.html#tex2html2"><SUP>2</SUP></A></DT>
116
116
<a class="url" href="http://www.lothar.com/tech/crypto/">http://www.lothar.com/tech/crypto/</a>