sha256crypt is a pure JavaScript utility providing hash and verify functionality without the need of external dependencies.
npm install sha256crypt
var sha256crypt = require('sha256crypt');
sha256crypt.hash(password, rounds, salt);
// sha256crypt.hash('password', 80000, 'wnsT7Yr92oJoP28r') => 'cKhJImk5mfuSKV9b3mumNzlbstFUplKtQXXMo4G6Ep5';
var sha256crypt = require('sha256crypt');
sha256crypt.verify(password, rounds, salt, checksum);
// sha256crypt.verify('password', 80000, 'wnsT7Yr92oJoP28r', 'cKhJImk5mfuSKV9b3mumNzlbstFUplKtQXXMo4G6Ep5') => true;
Thanks to Emscripten: An LLVM-to-JavaScript Compiler and all its contributers who made this possible.