WinRandom for Python
Submitted by Paweł Krawczyk on pt., 2008-09-19 13:41
This module gives direct access to Windows Cryptographic API CryptGetRandom() function. The range() function uses B.5.1.1 Simple Discard Method from NIST SP800-90 with FIPS 140-2 p. 44 Continuous random number generator test.
Example of winrandom usage:
>>> import winrandom >>> print winrandom.long() 2141228967 >>> print repr(winrandom.bytes(10)) '\xe6C\xfe\xbeRA\xfck"f' >>> print winrandom.range(1000) 123
Resources:
- Browse source at GitHub
- winrandom 1.2 at Python Package Index (PyPi)
- Fetch my PGP public key used to sign these packages
winrandom-ctypes
If you are looking for a ctypes based implementation, have a look at Gregory Taylor's winrandom-ctypes. Advantages are obvious - no need to compile anything, ctypes module is included in Python starting from 2.5.
Downloads
| Załącznik | Rozmiar |
|---|---|
| winrandom-1.2.zip | 3.46 KB |
| winrandom-1.2.win32-py2.7.exe | 197.25 KB |
| winrandom-1.2.win32-py2.7.exe_.sig | 490 bajtów |
| winrandom-1.2.zip_.sig | 490 bajtów |
- Zaloguj się lub zarejestruj by odpowiadać
- Generate PDF file
- Wersja do wydruku









