Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

node convert string to hash

// $ npm install sha1

var sha1 = require('sha1');
var hash = sha1("my message");
console.log(hash); // 104ab42f1193c336aa2cf08a2c946d5c6fd0fcdb

// or
// $ npm install md5
// and then

var md5 = require('md5');
var hash = md5("my message");
console.log(hash); // 8ba6c19dc1def5702ff5acbf2aeea5aa
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #node #convert #string #hash
ADD COMMENT
Topic
Name
1+7 =