Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const crypto = require('crypto');
- var mysqlPasswordHash = function(password) {
- var buffer = crypto.createHash('sha1').update(password).digest();
- var hash = crypto.createHash('sha1').update(buffer).digest('hex');
- return '*' + hash.toUpperCase();
- }
- console.log(mysqlPasswordHash('qwerty'));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement