Skip to content

Commit 52849b3

Browse files
committed
Update documentation and setup.py classifiers
1 parent 940f55f commit 52849b3

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
build/
22
dist/
33
MANIFEST
4-
Whirlpool.egg-info
4+
*.egg-info
5+
*.pyc
6+
*.so

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ The Whirlpool reference implementations are public domain, as is this code.
77

88
Wrapper written by James Cleveland with help from #python on irc.freenode.net.
99

10-
Wrapper modified by Olaf Conradi to use the hashlib interface.
10+
Wrapper extended to use the hashlib interface and ported to Python 3 by
11+
Olaf Conradi.
1112

1213
Usage
1314
-----
@@ -23,12 +24,26 @@ Python's hashlib.
2324
wp.update("My Salt")
2425
hashed_string = wp.hexdigest()
2526

27+
Starting with Python 3 text strings (as shown above) are stored as unicode.
28+
You need to specify the encoding of these strings before hashing.
29+
30+
wp = whirlpool.new(data.encoding('utf-8'))
31+
32+
Strings that are marked as binary do not need encoding.
33+
2634
Deprecated usage
2735
----------------
2836

29-
For backward compatibility the old interface remains available.
37+
For backward compatibility the old interface remains available. From Python 3
38+
onwards, the old interface is dropped.
3039

3140
import whirlpool
3241

3342
hashed_string = whirlpool.hash("My String")
3443

44+
45+
Testing
46+
-------
47+
48+
This module is tested using Python 2.7 and Python 3.3.
49+

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
"Programming Language :: Python",
2323
"Programming Language :: Python :: 2",
2424
"Programming Language :: Python :: 2.7",
25+
"Programming Language :: Python :: 3",
26+
"Programming Language :: Python :: 3.3",
2527
"Topic :: Security :: Cryptography",
2628
"Topic :: Software Development :: Libraries :: Python Modules",
2729
],
@@ -34,4 +36,3 @@
3436
data_files = [("whirlpool", ['nessie.h', "Whirlpool.c"])],
3537
test_suite = "tests"
3638
)
37-

0 commit comments

Comments
 (0)