lvh / caesium

Modern cryptography (libsodium/NaCl) for Clojure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pwhash should raise on error, not fail silently

lvh opened this issue · comments

commented

Many pwhash functions can fail for all sorts of reasons, including:

  • using unacceptable parameters (e.g. number of operations lower than OPSLIMIT_MIN). this changed between 1.0.14 and 1.0.15 so this is not an unrealistic scenario!
  • failure to malloc sufficient RAM

Other functions, like signature verification functions, raise on failure. pwhash functions should too.