mirror of
https://github.com/python/cpython.git
synced 2025-09-10 02:36:56 +00:00
Silence two warnings in blake2. key_length is between 0 and 64 (block size).
This commit is contained in:
parent
32a2ceead7
commit
cc554b65f1
2 changed files with 2 additions and 2 deletions
|
@ -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. */
|
||||||
|
|
|
@ -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. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue