Skip to content
Merged
Prev Previous commit
Next Next commit
consistent code style tweak
  • Loading branch information
gpshead authored May 6, 2023
commit 48cf3633391e7606abec414551c82fb1d08ca7c5
7 changes: 4 additions & 3 deletions Modules/sha3module.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,11 @@ _SHAKE_digest(SHA3object *self, unsigned long digestlen, int hex)
* - the algorith is not shake -- not the case here
* - the output length is zero -- we follow the existing behavior and return
* an empty digest, without raising an error */
if (digestlen > 0)
Hacl_Streaming_Keccak_squeeze(self->hash_state, digest, digestlen);
if (digestlen > 0) {
Hacl_Streaming_Keccak_squeeze(self->hash_state, digest, digestlen);
}
if (hex) {
result = _Py_strhex((const char *)digest, digestlen);
result = _Py_strhex((const char *)digest, digestlen);
} else {
result = PyBytes_FromStringAndSize((const char *)digest,
digestlen);
Expand Down