Silence two warnings in blake2. key_length is between 0 and 64 (block size).
This commit is contained in:
parent
32a2ceead7
commit
cc554b65f1
|
@ -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. */
|
||||
|
|
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue