Clean up some code and move document stores into subfolder

This commit is contained in:
John Crepezzi 2012-01-21 15:19:55 -05:00
parent 483fce891d
commit f37d1ad401
10 changed files with 92 additions and 44 deletions

View file

@ -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;
};