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.

Examples:

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

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


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
winrandom-1.2.zip (3.5 kB) Copy SHA256 hash SHA256 Source None

Supported by

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