Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is an alternative for bcrypt to use with node?

I have tried for days to get bcrypt installed on my windows machine with no luck. One of the dependencies (Windows 7 SDK) does not want to be installed even though I have tried numerous suggestions from around the net it just refuses to cooperate.

I need a good alternative to bcrypt which does not have any dependencies.

like image 790
Kory Avatar asked Nov 06 '13 20:11

Kory


People also ask

What is more secure than bcrypt?

SCrypt is a better choice today: better design than BCrypt (especially in regards to memory hardness) and has been in the field for 10 years. On the other hand, it has been used for many cryptocurrencies and we have a few hardware (both FPGA and ASIC) implementation of it.

Is bcrypt still the best?

A lot of your research is correct and still applies in 2021, so it is still secure to use BCrypt (which usually generates its own random salt for each password). Good password hashing algorithms are Argon2, SCrypt and BCrypt, they all offer a cost factor which controls the necessary time.

Should I use bcrypt or Bcryptjs?

Sync functions. Bcrypt is 3.1 times faster than bcryptjs in generating hash passwords and 1.3 times faster in comparing function.

What's the difference between bcrypt and Bcryptjs?

bcryptjs explicitly says "Optimized bcrypt in JavaScript with zero dependencies." So, yes, it's a pure Javascript implementation of bcrypt, which purportedly even "runs in the browser". bcrypt on the other hands list a number of dependencies. bcryptjs purports to be compatible with bcrypt.


1 Answers

Check out https://npmjs.org/package/bcryptjs, it's fully compatible with bcrypt just without the dependencies.

Or https://npmjs.org/package/simplecrypt if you don't want the crypto boilerplate and just need to encrypt and decrypt strings.

like image 75
enducat Avatar answered Sep 21 '22 19:09

enducat