Skip to content

Commit 9e2dbaa

Browse files
committed
Adjusted readme text
1 parent ac3b7f6 commit 9e2dbaa

File tree

3 files changed

+70
-18
lines changed

3 files changed

+70
-18
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
### Added
66
- Port to Python 3.
77
- Added PyPy support (PyPy3 does not work due to functions
8-
that have not yet been ported).
8+
that have not yet been ported, like `PyUnicode_New`).
99
- Added Continuous Integration using Travis-CI.
1010

1111
### Fixed
@@ -32,7 +32,7 @@
3232
- The `hash()` function is deprecated. Please transition to the hashlib
3333
interface and use `new()` and `hexdigest()`.
3434

35-
## 0.2 - Never released
35+
## 0.2 - Unreleased
3636

3737
## [0.1] - 2011-05-18
3838

README.md

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,29 @@
44
python-whirlpool
55
================
66

7-
The Whirlpool algorithm is designed by Vincent Rijmen and Paulo S.L.M. Barreto.
8-
This is just a wrapper to the Whirlpool C reference implementation.
7+
The [Whirlpool] algorithm is designed by Vincent Rijmen and Paulo S.L.M. Barreto.
8+
It is a secure and modern digest function that has been recommended by the
9+
[NESSIE] project and adopted in the ISO/IEC 10118-3 international standard.
10+
11+
Digest functions, also known as hash functions, produce fixed-length output (a
12+
digest or hash) from a variable-length message. They are designed to be a
13+
one-way function.
14+
15+
This library is a Python wrapper around the Whirlpool C reference implementation.
916
The Whirlpool reference implementations are public domain, as is this code.
1017

11-
Wrapper written by James Cleveland with help from #python on irc.freenode.net.
18+
The first version of the wrapper was written by James Cleveland with help
19+
from #python on irc.freenode.net.
20+
21+
Later on the wrapper was rewritten by Olaf Conradi to use the hashlib interface
22+
and made compatible with Python 3.
23+
24+
Installation
25+
------------
1226

13-
Wrapper extended to use the hashlib interface and ported to Python 3 by
14-
Olaf Conradi.
27+
This library is available on [PyPi].
28+
29+
pip install whirlpool
1530

1631
Usage
1732
-----
@@ -34,7 +49,32 @@ You need to specify the encoding of these strings before hashing.
3449

3550
Strings that are marked as binary do not need encoding.
3651

52+
Development
53+
-----------
54+
55+
The source code is available on [GitHub].
56+
57+
git clone https://github.com/oohlaf/python-whirlpool.git
58+
cd python-whirlpool
59+
60+
Install in development mode using:
61+
62+
python setup.py develop
63+
64+
Or install in editable mode using pip:
65+
66+
pip install -e .
67+
3768
Testing
3869
-------
3970

40-
This module is tested using Python 2.7 and Python 3.3.
71+
This module is tested using Python 2.7, Pypy, and Python 3.3 and up.
72+
73+
You can run the testsuite using
74+
75+
python setup.py test
76+
77+
[Whirlpool]: https://en.wikipedia.org/wiki/Whirlpool_(cryptography)
78+
[NESSIE]: https://www.cosic.esat.kuleuven.be/nessie/
79+
[PyPi]: https://pypi.python.org/pypi/Whirlpool
80+
[GitHub]: https://github.com/oohlaf/python-whirlpool

setup.py

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
1-
""" Whirlpool: Bindings for whirlpool hash reference implementation.
2-
3-
The Whirlpool hashing algorithm (http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html),
4-
written by Vincent Rijmen and Paulo S. L. M. Barreto is a secure, modern hash which is
5-
as yet unbroken and fairly obscure. Provided on the algorithm's page is a C reference
6-
implementation which is fairly simple to wrap with a Python extension, which is much
7-
faster than re-implementation in pure Python.
8-
"""
1+
"""Whirlpool: Bindings for whirlpool hash reference implementation."""
2+
import os
3+
import sys
4+
95
from setuptools import setup, Extension
106

7+
if sys.version_info.major < 3:
8+
from io import open
9+
10+
11+
doclines = __doc__.strip().split('\n')
12+
13+
14+
HERE = os.path.abspath(os.path.dirname(__file__))
15+
with open(os.path.join(HERE, 'README.md'), encoding='utf-8') as f:
16+
README = '\n' + f.read()
17+
with open(os.path.join(HERE, 'CHANGELOG.md'), encoding='utf-8') as f:
18+
CHANGELOG = '\n' + f.read()
1119

12-
doclines = __doc__.split("\n")
1320

1421
setup(name = "Whirlpool",
1522
version = "1.0.0.dev1",
1623
description = doclines[0],
17-
long_description = "\n".join(doclines[2:]),
24+
long_description = README + '\n' + CHANGELOG,
1825
classifiers=[
26+
"Development Status :: 5 - Production/Stable",
1927
"Intended Audience :: Developers",
2028
"License :: Public Domain",
2129
"Programming Language :: C",
@@ -24,6 +32,10 @@
2432
"Programming Language :: Python :: 2.7",
2533
"Programming Language :: Python :: 3",
2634
"Programming Language :: Python :: 3.3",
35+
"Programming Language :: Python :: 3.4",
36+
"Programming Language :: Python :: 3.5",
37+
"Programming Language :: Python :: 3.6",
38+
"Programming Language :: Python :: Implementation :: PyPy",
2739
"Topic :: Security :: Cryptography",
2840
"Topic :: Software Development :: Libraries :: Python Modules",
2941
],

0 commit comments

Comments
 (0)