crypt3-prebuilt
crypt(3) for Node.js
Installation
Install using npm install crypt3-prebuilt
and use:
var crypt = ;
Example password check
if !== '$1$SrkubyRm$DEQU3KupUxt4yfhbK1HyV/' console; return;
Example password encoding
Use crypt(key[, salt])
:
console; // Salt generated automatically using default SHA512console; // MD5 saltconsole; // Blowfish salt (only some Linux distros)console; // SHA-256console; // SHA-512
Create hashes
Use crypt.createSalt([type=sha512])
where type is one of md5
, blowfish
, sha256
or sha512
(default).