77 * on irc.freenode.net
88 */
99
10- #define PY_SSIZE_T_CLEAN 1
1110#include <Python.h>
1211#include "Whirlpool.c"
1312
@@ -73,7 +72,7 @@ whirlpool_digest(whirlpoolobject *self)
7372 NESSIEstruct wpContext ;
7473 unsigned char digest [DIGESTBYTES ];
7574
76- /* make a temporary copy, and perform the final */
75+ /* Make a temporary copy, and perform the final */
7776 wpContext = self -> whirlpool ;
7877 NESSIEfinalize (& wpContext , digest );
7978
@@ -174,10 +173,17 @@ static PyGetSetDef whirlpool_getseters[] = {
174173
175174
176175PyDoc_STRVAR (module_doc ,
177- "This module implements the whirlpool digest algorithm.\n\
176+ "This module implements the interface to the whirlpool message digest\n\
177+ algorithm. It operates on messages less than 2^256 bits in length,\n\
178+ and produces a message digest of 512 bits. Its use is quite straighforward:\n\
179+ use new() to create a whirlpool object. You can now feed this object with\n\
180+ arbitrary strings using the update() method. At any point you can ask it for\n\
181+ the digest of the concatenation of the strings fed to it so far.\n\
178182\n\
179183Functions:\n\
180184new([arg]) -- return a new whirlpool object, initialized with arg if provided\n\
185+ hash(arg) -- DEPRECATED, returns a whirlpool digest of arg, for backward \
186+ compatibility\n\
181187\n\
182188Special Objects:\n\
183189\n\
@@ -189,7 +195,7 @@ a string of information.\n\
189195\n\
190196Methods:\n\
191197\n\
192- update() -- updates the current digest with an additional string\n\
198+ update(arg ) -- updates the current digest with an additional string\n\
193199digest() -- return the current digest value\n\
194200hexdigest() -- return the current digest as a string of hexadecimal digits\n\
195201copy() -- return a copy of the current whirlpool object" );
@@ -282,7 +288,7 @@ whirlpool_hash(PyObject *self, PyObject *args) {
282288}
283289
284290PyDoc_STRVAR (hash_doc ,
285- "Hash with whirlpool algorithm." );
291+ "Returns a hash of argument using the whirlpool algorithm." );
286292
287293
288294/* List of functions exported by this module */
0 commit comments