cpython: 40a1652349e9 (original) (raw)

Mercurial > cpython

changeset 79722:40a1652349e9

Issue #16234: Modify sha3's block_size method to return NotImplemented. This makes the sha3 types unusable from the hmac module. HMAC-SHA3 hasn't been specified yet. [#16234]

Christian Heimes christian@cheimes.de
date Sun, 14 Oct 2012 22:16:27 +0200
parents bf9d118779f5
children d3c7ebdc71bb
files Modules/_sha3/sha3module.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-)[+] [-] Modules/_sha3/sha3module.c 8

line wrap: on

line diff

--- a/Modules/_sha3/sha3module.c +++ b/Modules/_sha3/sha3module.c @@ -140,7 +140,7 @@ #include "keccak/KeccakF-1600-opt32.c" #endif -#define SHA3_BLOCKSIZE 200 /* 1600 bits / +/ #define SHA3_BLOCKSIZE 200 // 1600 bits / #define SHA3_MAX_DIGESTSIZE 64 / 512 bits */ #define SHA3_state hashState #define SHA3_init Init @@ -367,7 +367,11 @@ static PyMethodDef SHA3_methods[] = { static PyObject * SHA3_get_block_size(SHA3object *self, void *closure) {

} static PyObject *