blob: 9c86ae6239ac349dbf4bf0a9abd17977b769395b [file] [log] [blame]
Jonathan Ballet6381da32011-07-20 16:43:38 +09001.. _openssl-rand:
2
Hynek Schlawack80d005f2015-10-20 18:34:13 +02003:mod:`rand` --- An interface to the OpenSSL pseudo random number generator
4==========================================================================
5
6.. warning::
Hynek Schlawackd367dbc2015-10-21 11:22:01 +02007 Functions from this module shouldn't be used.
Hynek Schlawack80d005f2015-10-20 18:34:13 +02008 `Use urandom <http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers/>`_ instead.
9
Jonathan Ballet6381da32011-07-20 16:43:38 +090010
Jonathan Balletc9e066c2011-07-17 22:56:05 +090011.. py:module:: OpenSSL.rand
Jonathan Ballet6381da32011-07-20 16:43:38 +090012 :synopsis: An interface to the OpenSSL pseudo random number generator
Jonathan Balletc9e066c2011-07-17 22:56:05 +090013
Jonathan Balletc9e066c2011-07-17 22:56:05 +090014
Hynek Schlawack80d005f2015-10-20 18:34:13 +020015This module handles the OpenSSL pseudo random number generator (PRNG) and declares the following:
Jonathan Balletc9e066c2011-07-17 22:56:05 +090016
Hynek Schlawack80d005f2015-10-20 18:34:13 +020017.. autofunction:: add
Jonathan Balletc9e066c2011-07-17 22:56:05 +090018
Hynek Schlawack80d005f2015-10-20 18:34:13 +020019.. autofunction:: bytes
20
21.. autofunction:: cleanup
22
23.. autofunction:: egd(path[, bytes])
24
25.. autofunction:: load_file(filename[, bytes])
26
27.. autofunction:: seed
28
29.. autofunction:: status
30
31.. autofunction:: write_file
Jonathan Ballet648875f2011-07-16 14:14:58 +090032
33
Hynek Schlawack80d005f2015-10-20 18:34:13 +020034.. function:: screen
Jonathan Balletc9e066c2011-07-17 22:56:05 +090035
36 Add the current contents of the screen to the PRNG state.
37
38 Availability: Windows.
39
Hynek Schlawack80d005f2015-10-20 18:34:13 +020040 :return: :obj:`None`
Jonathan Balletc9e066c2011-07-17 22:56:05 +090041
42
Hynek Schlawack80d005f2015-10-20 18:34:13 +020043.. autoexception:: Error