Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11dc6c3 commit 7707f6fCopy full SHA for 7707f6f
1 file changed
Modules/_sha3/sha3module.c
@@ -140,7 +140,7 @@
140
#include "keccak/KeccakF-1600-opt32.c"
141
#endif
142
143
-#define SHA3_BLOCKSIZE 200 /* 1600 bits */
+/* #define SHA3_BLOCKSIZE 200 // 1600 bits */
144
#define SHA3_MAX_DIGESTSIZE 64 /* 512 bits */
145
#define SHA3_state hashState
146
#define SHA3_init Init
@@ -367,7 +367,11 @@ static PyMethodDef SHA3_methods[] = {
367
static PyObject *
368
SHA3_get_block_size(SHA3object *self, void *closure)
369
{
370
- return PyLong_FromLong(SHA3_BLOCKSIZE);
+ /* HMAC-SHA3 hasn't been specified yet and no official test vectors are
371
+ * available. Thus block_size returns NotImplemented to prevent people
372
+ * from using SHA3 with the hmac module.
373
+ */
374
+ Py_RETURN_NOTIMPLEMENTED;
375
}
376
377
0 commit comments