Skip to content

Commit 43f4ba7

Browse files
committed
Merge branch 'protz_sha3' of pro.github.com:msprotz/cpython into protz_sha3
2 parents 4b58915 + 48cf363 commit 43f4ba7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Modules/sha3module.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -402,10 +402,11 @@ _SHAKE_digest(SHA3object *self, unsigned long digestlen, int hex)
402402
* - the algorith is not shake -- not the case here
403403
* - the output length is zero -- we follow the existing behavior and return
404404
* an empty digest, without raising an error */
405-
if (digestlen > 0)
406-
Hacl_Streaming_Keccak_squeeze(self->hash_state, digest, digestlen);
405+
if (digestlen > 0) {
406+
Hacl_Streaming_Keccak_squeeze(self->hash_state, digest, digestlen);
407+
}
407408
if (hex) {
408-
result = _Py_strhex((const char *)digest, digestlen);
409+
result = _Py_strhex((const char *)digest, digestlen);
409410
} else {
410411
result = PyBytes_FromStringAndSize((const char *)digest,
411412
digestlen);

0 commit comments

Comments
 (0)