paixaop/node-sodium

Allow passing a `null` key to `crypto_generichash_blake2b_init`

cakoose opened this issue · 0 comments

[Edit: fixed the details of which functions accept null and which ones don't.]

In node-sodium

  • crypto_generichash (source) allows a null key
  • crypto_generichash_init (source) does not
  • crypto_generichash_blake2b (source)
  • crypto_generichash_blake2b_init (source) does not

In the underlying libsodium, the docs say that you can pass a null key: https://libsodium.gitbook.io/doc/hashing/generic_hashing

Is it ok to change node-sodium's and crypto_generichash_init and crypto_generichash_blake2b_init to accept a null key as well?