Last active
May 8, 2017 04:44
-
-
Save ozouai/24fdaedfbd89a811a69f9209485a0665 to your computer and use it in GitHub Desktop.
Node SecurePIN
This file contains 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 securePin = require("secure-pin"); | |
securePin.generatePin(4, function(pin) { | |
console.log(pin); | |
}); |
This file contains 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 securePin = require("secure-pin"); | |
var pin = securePin.generatePinSync(4); | |
console.log(pin); |
This file contains 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 securePin = require("secure-pin"); | |
var charSet = new securePin.CharSet(); | |
charSet.addLowerCaseAlpha().addUpperCaseAlpha().addNumeric().randomize(); | |
securePin.generateString(15, charSet, function(str) { | |
console.log(str); | |
}); |
This file contains 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 securePin = require("secure-pin"); | |
var charSet = new securePin.CharSet(); | |
charSet.addLowerCaseAlpha().addUpperCaseAlpha().addNumeric().randomize(); | |
var str = securePin.generateStringSync(10, charSet); | |
console.log(str); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment