diff options
author | Jean-Paul Calderone <exarkun@divmod.com> | 2009-07-16 14:09:53 -0400 |
---|---|---|
committer | Jean-Paul Calderone <exarkun@divmod.com> | 2009-07-16 14:09:53 -0400 |
commit | 4a557c5a755cc71208400eaac43c8e0add249b3d (patch) | |
tree | 68f02eb6eeed88607ed2403f4573f9c895eff752 /doc | |
parent | 10e3a08f8912cb441393889eab8714f6149d1141 (diff) | |
parent | 5293b566f48aa03c79ae368b9f2b8a1bc312ceb5 (diff) | |
download | pyopenssl-4a557c5a755cc71208400eaac43c8e0add249b3d.tar.gz |
Add OpenSSL.rand.bytes function
Diffstat (limited to 'doc')
-rw-r--r-- | doc/README | 18 | ||||
-rw-r--r-- | doc/pyOpenSSL.tex | 22 |
2 files changed, 40 insertions, 0 deletions
diff --git a/doc/README b/doc/README new file mode 100644 index 0000000..0ceff15 --- /dev/null +++ b/doc/README @@ -0,0 +1,18 @@ + +Only the .tex format documentation is original, +because the others are derived from it, so don't +edit them directly. To build the other formats +use a command of ... + + make all + + +To build the documentation you will need to have +latex2html and lynx installed. On Fedora both can +be obtained with ... + + sudo yum install latex2html lynx + +Or on Debian or Ubuntu ... + + sudo apt-get install latex2html lynx diff --git a/doc/pyOpenSSL.tex b/doc/pyOpenSSL.tex index 5776b80..1a05e64 100644 --- a/doc/pyOpenSSL.tex +++ b/doc/pyOpenSSL.tex @@ -593,6 +593,18 @@ Mix bytes from \var{string} into the PRNG state. The \var{entropy} argument is \var{string}, measured in bytes. For more information, see e.g. \rfc{1750}. \end{funcdesc} +\begin{funcdesc}{bytes}{num_bytes} +Get some random bytes from the PRNG as a string. + +This is a wrapper for the C function \function{RAND_bytes}. +\end{funcdesc} + +\begin{funcdesc}{cleanup}{} +Erase the memory used by the PRNG. + +This is a wrapper for the C function \function{RAND_cleanup}. +\end{funcdesc} + \begin{funcdesc}{egd}{path\optional{, bytes}} Query the Entropy Gathering Daemon\footnote{See \url{http://www.lothar.com/tech/crypto/}} on socket \var{path} for \var{bytes} @@ -624,6 +636,16 @@ Write a number of random bytes (currently 1024) to the file \var{path}. This file can then be used with \function{load_file} to seed the PRNG again. \end{funcdesc} +\begin{excdesc}{Error} +If the current RAND method supports any errors, this is raised when needed. +The default method does not raise this when the entropy pool is depleted. + +Whenever this exception is raised directly, it has a list of error messages +from the OpenSSL error queue, where each item is a tuple \code{(\var{lib}, +\var{function}, \var{reason})}. Here \var{lib}, \var{function} and \var{reason} +are all strings, describing where and what the problem is. See \manpage{err}{3} +for more information. +\end{excdesc} % % % SSL module |