Raise exception when scrypt fails.
Add exn and non-exn versions of api.