Skip to main content

Access to Cryptographic API random generator

Project description

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.


>>> import winrandom
>>> print winrandom.long()
>>> print repr(winrandom.bytes(10))
<10 random bytes>
>> print winrandom.range(1000)

Changelog: 1.0 added winrandom.long() 1.1 added winrandom.bytes(num) returning num random bytes 1.2 added winrandom.range(max) returning random index n where 0 <= n < max

Project details

Release history Release notifications

This version
History Node


History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
winrandom-1.2.win32-py2.7.exe (202.0 kB) Copy SHA256 hash SHA256 Windows Installer 2.7 Jan 20, 2012 (3.5 kB) Copy SHA256 hash SHA256 Source None Jan 20, 2012

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page