forked from kravietz/winrandom
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
43 lines (38 loc) · 1.35 KB
/
Copy pathsetup.py
File metadata and controls
43 lines (38 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
from distutils.core import setup, Extension
winrandom1 = Extension('winrandom',
libraries=['Crypt32', 'Advapi32'],
sources=['src/winrandom.c'])
setup (name='winrandom',
author='Pawel Krawczyk',
author_email='pawel.krawczyk@hush.com',
url='http://ipsec.pl/winrandom',
version='1.2',
description='Access to Cryptographic API random generator',
long_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
""",
license="Public domain",
platforms=["Win32"],
classifiers=['Classifier: Development Status :: 5 - Production/Stable',
'License :: Public Domain',
'Topic :: Security :: Cryptography',
'Programming Language :: C',
'Classifier: Programming Language :: Python',
'Intended Audience :: Developers',
'Operating System :: Microsoft :: Windows'],
ext_modules=[winrandom1])