Silence two warnings in blake2. key_length is between 0 and 64 (block size).

This commit is contained in:
Christian Heimes 2016-09-07 02:49:11 +02:00
parent 32a2ceead7
commit cc554b65f1
2 changed files with 2 additions and 2 deletions

View File

@ -208,7 +208,7 @@ py_blake2b_new_impl(PyTypeObject *type, PyObject *data, int digest_size,
BLAKE2B_KEYBYTES); BLAKE2B_KEYBYTES);
goto error; goto error;
} }
self->param.key_length = key->len; self->param.key_length = (uint8_t)key->len;
} }
/* Initialize hash state. */ /* Initialize hash state. */

View File

@ -208,7 +208,7 @@ py_blake2s_new_impl(PyTypeObject *type, PyObject *data, int digest_size,
BLAKE2S_KEYBYTES); BLAKE2S_KEYBYTES);
goto error; goto error;
} }
self->param.key_length = key->len; self->param.key_length = (uint8_t)key->len;
} }
/* Initialize hash state. */ /* Initialize hash state. */