Skip to content

Commit dd07333

Browse files
committed
Add digest_size and block_size to the module
They are not read-only however.
1 parent 577c992 commit dd07333

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,8 @@ initwhirlpool(void)
332332
m = Py_InitModule3("whirlpool", whirlpool_functions, module_doc);
333333
if (m == NULL)
334334
return;
335+
PyModule_AddIntConstant(m, "digest_size", DIGESTBYTES);
336+
PyModule_AddIntConstant(m, "block_size", WBLOCKBYTES);
335337
d = PyModule_GetDict(m);
336338
PyDict_SetItemString(d, "WhirlpoolType", (PyObject *)&Whirlpooltype);
337339
}

0 commit comments

Comments
 (0)