Created
January 22, 2016 04:35
-
-
Save cgmb/4027504aac16e86ffc61 to your computer and use it in GitHub Desktop.
A basic example of node-argon2 v0.4.2
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 argon2 = require('argon2'); | |
| var pass = "password"; | |
| var salt = argon2.generateSaltSync(); | |
| var hash = argon2.encryptSync(pass, salt, { | |
| timeCost: 3, memoryCost: 12, parallelism: 1 | |
| }); | |
| console.log(pass); | |
| console.log(hash); |
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
| { | |
| "name": "node-argon2-bug5-fail", | |
| "version": "0.0.1", | |
| "description": "An example showing that node-argon2 v0.4.2 installs correctly.", | |
| "main": "main.js", | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "author": "Cordell Bloor <[email protected]>", | |
| "private": true, | |
| "dependencies": { | |
| "argon2": "0.4.2" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment