Error installing bcrypt with npm

The easy solution is just switch from the “bcrypt” npm module to bycryptjs or bcrypt-nodejs. It’s the exact same API, but pure JS so no native add-ons to deal with. npm install –save bcryptjs && npm uninstall –save bcrypt Then change your require calls to “bcryptjs”, but all your code otherwise can be unchanged. Long … Read more

Unable to install gem – Failed to build gem native extension – cannot load such file — mkmf (LoadError)

There are similar questions: `require’: no such file to load — mkmf (LoadError) Failed to build gem native extension (mkmf (LoadError)) – Ubuntu 12.04 Usually, the solution is: sudo apt-get install ruby-dev Or, if that doesn’t work, depending on your ruby version, run something like: sudo apt-get install ruby1.9.1-dev Should fix your problem. Still not … Read more

What column type/length should I use for storing a Bcrypt hashed password in a Database?

The modular crypt format for bcrypt consists of $2$, $2a$ or $2y$ identifying the hashing algorithm and format a two digit value denoting the cost parameter, followed by $ a 53 characters long base-64-encoded value (they use the alphabet ., /, 0–9, A–Z, a–z that is different to the standard Base 64 Encoding alphabet) consisting … Read more