-
-
Save edmon1024/c96c831a3a6b4042c35bc4bb3690cfd4 to your computer and use it in GitHub Desktop.
Creating sha-1 on Node.js.
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'); | |
| function sha1( data ) { | |
| var generator = crypto.createHash('sha1'); | |
| generator.update( data ) | |
| return generator.digest('hex') | |
| } | |
| console.log( sha1('adrian') ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment