diff options
author | Christian Heimes <christian@python.org> | 2016-09-07 02:49:11 +0200 |
---|---|---|
committer | Christian Heimes <christian@python.org> | 2016-09-07 02:49:11 +0200 |
commit | 810e6d95c8844e80d133bf640bfe0594a9bb6144 (patch) | |
tree | ff4d92cfe3c9bc50f6f00a6856afbaeb752b57c1 /Modules/_blake2 | |
parent | 44d7015fa936394a0831df01c7050177d219537b (diff) | |
download | cpython-810e6d95c8844e80d133bf640bfe0594a9bb6144.tar.gz |
Silence two warnings in blake2. key_length is between 0 and 64 (block size).
Diffstat (limited to 'Modules/_blake2')
-rw-r--r-- | Modules/_blake2/blake2b_impl.c | 2 | ||||
-rw-r--r-- | Modules/_blake2/blake2s_impl.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_blake2/blake2b_impl.c b/Modules/_blake2/blake2b_impl.c index 1c67744f75..9c3d8f54d5 100644 --- a/Modules/_blake2/blake2b_impl.c +++ b/Modules/_blake2/blake2b_impl.c @@ -208,7 +208,7 @@ py_blake2b_new_impl(PyTypeObject *type, PyObject *data, int digest_size, BLAKE2B_KEYBYTES); goto error; } - self->param.key_length = key->len; + self->param.key_length = (uint8_t)key->len; } /* Initialize hash state. */ diff --git a/Modules/_blake2/blake2s_impl.c b/Modules/_blake2/blake2s_impl.c index 8b38270ae8..53c22c2a9b 100644 --- a/Modules/_blake2/blake2s_impl.c +++ b/Modules/_blake2/blake2s_impl.c @@ -208,7 +208,7 @@ py_blake2s_new_impl(PyTypeObject *type, PyObject *data, int digest_size, BLAKE2S_KEYBYTES); goto error; } - self->param.key_length = key->len; + self->param.key_length = (uint8_t)key->len; } /* Initialize hash state. */ |