1
0
mirror of https://github.com/S2-/securerandomstring.git synced 2025-08-02 02:10:05 +02:00
2015-04-25 16:42:30 +02:00
2015-04-25 16:30:04 +02:00
2015-04-22 20:47:27 +02:00
2015-04-25 16:42:30 +02:00
2015-04-25 16:30:04 +02:00
2015-04-25 16:30:04 +02:00

secure-random-string

a node module that generates a secure random string with a given length

Usage

require it

var srs = require('secure-random-string');

generate a random string that is 32 chars long (the default)

srs(function(sr) {
	console.log(sr);
});

generate a random string that is 256 chars long

srs({length: 256}, function(sr) {
	console.log(sr);
});

generate a random string that is 20 chars long and is url safe (can be used as a url token)

srs({length: 20, urlsafe: true}, function(sr) {
	console.log(sr);
});
Description
No description provided
Readme 57 KiB
Languages
JavaScript 100%