OpenSSL.rand.bytes() to get a random bytes
Bug #334570 reported by
rick_dean
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyOpenSSL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
This patch implements OpenSSL.
them doesn't require OpenSSL.
a test case, and supports named parameters. It applies to
revision 95 of branch ext-context, and probably others. I release
this code under v2 and later of the LGPL.
To get a random unsigned long long integer use...
from OpenSSL import rand
import struct
m = struct.unpack("Q", rand.bytes(8))
Related branches
lp:~rick-fdd/pyopenssl/rand_bytes2
- Jean-Paul Calderone: Pending requested
- Diff: None lines
Changed in pyopenssl: | |
status: | New → Fix Committed |
Changed in pyopenssl: | |
milestone: | none → 0.10 |
Changed in pyopenssl: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I ported these changes to the tip of trunk, and
committed a new branch lp:~rick-fdd/pyopenssl/rand_bytes2
It has updates to test cases and documentation.
In the doc directory only pyOpenSSL.tex is original, and
the rest are derived from it, right? The committed
pyOpenSSL.txt is out of date even before my changes.
The HTML source gets a bunch of trivial changes from
my version of the derivation tools, so I'll let you do it.
What is our policy on referencing OpenSSL C function
names, so users can consult that documentation if
need be?
OpenSSL. rand.cleanup( ) was missing TEX documentation.
I added a test case for load_file() and write_file() test.util( ).
and status(). The test cases now use OpenSSL.