Created
November 10, 2016 08:22
-
-
Save Wats0ns/bb6210d4bfb4e0ce9d8db41750661363 to your computer and use it in GitHub Desktop.
CakePHP Security::Hash in NodeJS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var crypto = require('crypto'); | |
var hash_sha1 = function(password, salt){ | |
password = salt + password; | |
var hash = crypto.createHash('sha1'); | |
hash.update(password); | |
var value = hash.digest('hex'); | |
return value; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment