~exarkun/pyopenssl/trunk

« back to all changes in this revision

Viewing changes to OpenSSL/rand/rand.c

  • Committer: Jean-Paul Calderone
  • Date: 2011-09-11 19:49:43 UTC
  • mfrom: (156.3.22 sphinx-doc)
  • Revision ID: exarkun@divmod.com-20110911194943-ucaan2tzidk7ek5l
Convert the documentation from LaTeX/epytext to Sphinx/ReST

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
static char rand_add_doc[] = "\n\
34
34
Add data with a given entropy to the PRNG\n\
35
35
\n\
36
 
@param buffer: Buffer with random data\n\
37
 
@param entropy: The entropy (in bytes) measurement of the buffer\n\
38
 
@return: None\n\
 
36
:param buffer: Buffer with random data\n\
 
37
:param entropy: The entropy (in bytes) measurement of the buffer\n\
 
38
:return: None\n\
39
39
";
40
40
 
41
41
static PyObject *
57
57
static char rand_seed_doc[] = "\n\
58
58
Alias for rand_add, with entropy equal to length\n\
59
59
\n\
60
 
@param buffer: Buffer with random data\n\
61
 
@return: None\n\
 
60
:param buffer: Buffer with random data\n\
 
61
:return: None\n\
62
62
";
63
63
 
64
64
static PyObject *
79
79
static char rand_status_doc[] = "\n\
80
80
Retrieve the status of the PRNG\n\
81
81
\n\
82
 
@return: True if the PRNG is seeded enough, false otherwise\n\
 
82
:return: True if the PRNG is seeded enough, false otherwise\n\
83
83
";
84
84
 
85
85
static PyObject *
96
96
Add the current contents of the screen to the PRNG state. Availability:\n\
97
97
Windows.\n\
98
98
\n\
99
 
@return: None\n\
 
99
:return: None\n\
100
100
";
101
101
 
102
102
static PyObject *
116
116
PRNG. I haven't found any problems when the socket is missing, the function\n\
117
117
just returns 0.\n\
118
118
\n\
119
 
@param path: The path to the EGD socket\n\
120
 
@param bytes: (optional) The number of bytes to read, default is 255\n\
121
 
@returns: The number of bytes read (NB: a value of 0 isn't necessarily an\n\
 
119
:param path: The path to the EGD socket\n\
 
120
:param bytes: (optional) The number of bytes to read, default is 255\n\
 
121
:returns: The number of bytes read (NB: a value of 0 isn't necessarily an\n\
122
122
          error, check rand.status())\n\
123
123
";
124
124
 
137
137
static char rand_cleanup_doc[] = "\n\
138
138
Erase the memory used by the PRNG.\n\
139
139
\n\
140
 
@return: None\n\
 
140
:return: None\n\
141
141
";
142
142
 
143
143
static PyObject *
155
155
static char rand_load_file_doc[] = "\n\
156
156
Seed the PRNG with data from a file\n\
157
157
\n\
158
 
@param filename: The file to read data from\n\
159
 
@param maxbytes: (optional) The number of bytes to read, default is\n\
 
158
:param filename: The file to read data from\n\
 
159
:param maxbytes: (optional) The number of bytes to read, default is\n\
160
160
                 to read the entire file\n\
161
 
@return: The number of bytes read\n\
 
161
:return: The number of bytes read\n\
162
162
";
163
163
 
164
164
static PyObject *
176
176
static char rand_write_file_doc[] = "\n\
177
177
Save PRNG state to a file\n\
178
178
\n\
179
 
@param filename: The file to write data to\n\
180
 
@return: The number of bytes written\n\
 
179
:param filename: The file to write data to\n\
 
180
:return: The number of bytes written\n\
181
181
";
182
182
 
183
183
static PyObject *
194
194
static char rand_bytes_doc[] = "\n\
195
195
Get some randomm bytes as a string.\n\
196
196
\n\
197
 
@param num_bytes: The number of bytes to fetch\n\
198
 
@return: A string of random bytes\n\
 
197
:param num_bytes: The number of bytes to fetch\n\
 
198
:return: A string of random bytes\n\
199
199
";
200
200
 
201
201
#if PY_VERSION_HEX < 0x02050000