erlang-bcrypt
erlang-bcrypt copied to clipboard
Erlang wrapper for OpenBSD's Blowfish password hashing code
Hi! ``` 56> bcrypt:hashpw("12456", "$2b$12$j4P7eTvx7x2F.wj6HORIzetQmoegqZ1xo0B2jo/XNABgN5lMWswMi"). {error,"bcrypt failed"} ``` The ```hash string``` is produced by [comeonin](https://github.com/riverrun/comeonin)
**Env:** Erlang/OTP 20+ Exec following code ``` > {ok, Salt} = bcrypt:gen_salt(). ``` exception error: ``` ** exception exit: {{function_clause,[{bcrypt_nif_worker,terminate, [{undef,[{crypto,rand_bytes,[16],[]}, {bcrypt_nif,gen_salt,1, [{file,"src/bcrypt_nif.erl"},{line,57}]}, ... ```
Fixes compilation on Solaris/SmartOS
The library fails to compile on SmartOS the issue is `-lnsl` is missing when linking.
`crypto:rand_bytes/1` has been deprecated in newer versions of erlang. This PR replace the calls to `crypto:rand_bytes/1` with `crypto:strong_rand_bytes/1`. This will probably break the compatibility with older versions of Erlang. If...
If bcrypt is added as a dependency in a "rebar3 project" then the port executable `priv/bcrypt` is not built. The `.so` file is built. Am wondering what needs to be...
I am getting this error when compiling the nif ``` Applications/Xcode.app/Contents/Developer/usr/bin/make -f c_src/Makefile.erlang.mk cc -c -o c_src/async_queue.o c_src/async_queue.c -finline-functions -Wall -fPIC -I /usr/local/Cellar/erlang/18.1/lib/erlang/erts-7.1/include -I /usr/local/Cellar/erlang/18.1/lib/erlang/lib/erl_interface-3.8/include -Ic_src -Wall -fPIC -finline-functions -Wall...
The bcrypt_nif.so is missing. /rel/tengiStore/lib/bcrypt-0.4.1/priv/bcrypt_nif.so: cannot open shared object file: No such file or directory'"