Clean up some code and move document stores into subfolder
This commit is contained in:
@@ -8,8 +8,10 @@ var RandomKeyGenerator = function(options) {
|
||||
// Generate a random key
|
||||
RandomKeyGenerator.prototype.createKey = function(keyLength) {
|
||||
var text = '';
|
||||
var index;
|
||||
for (var i = 0; i < keyLength; i++) {
|
||||
text += this.keyspace.charAt(Math.floor(Math.random() * this.keyspace.length));
|
||||
index = Math.floor(Math.random() * this.keyspace.length);
|
||||
text += this.keyspace.charAt(index);
|
||||
}
|
||||
return text;
|
||||
};
|
||||
|
Reference in New Issue
Block a user