erlangpack / bcrypt

Erlang wrapper for OpenBSD's Blowfish password hashing code
https://hex.pm/packages/bcrypt
Other
17 stars 19 forks source link

Make bcrypt twice faster #5

Closed egobrain closed 6 years ago

egobrain commented 6 years ago
> S = "$2a$12$6gGcgnW/qDv8sCZ6Bj1qj.ZOpk.64CBYO5C1aPY9UIUs5TcmyykKC".

> timer:tc(bcrypt, hashpw, [S, S]).
{790990,
 {ok,"$2a$12$6gGcgnW/qDv8sCZ6Bj1qj.ZOpk.64CBYO5C1aPY9UIUs5TcmyykKC"}}

%% vs 

> timer:tc(bcrypt, hashpw, [S, S]).
{348747,
 {ok,"$2a$12$6gGcgnW/qDv8sCZ6Bj1qj.hPVEhC7j/NCGywUpw.nfmHlJmXMQ.Li"}}