Clean up some code and move document stores into subfolder
This commit is contained in:
parent
483fce891d
commit
f37d1ad401
10 changed files with 92 additions and 44 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue