shared: accept empty buffer for nm_hash_update()

There is no need to reject empty buffers. c_siphash_append() handles
them gracefully.
This commit is contained in:
Thomas Haller 2020-03-24 11:07:32 +01:00
parent 2da092b592
commit 962ad7f850

View file

@ -95,8 +95,7 @@ static inline void
nm_hash_update (NMHashState *state, const void *ptr, gsize n)
{
nm_assert (state);
nm_assert (ptr);
nm_assert (n > 0);
nm_assert (n == 0 || ptr);
/* Note: the data passed in here might be sensitive data (secrets),
* that we should nm_explicty_zero() afterwards. However, since