Skip to content

Commit

Permalink
simple [0-9a-z]{6,7} password (31-bit entropy)
Browse files Browse the repository at this point in the history
  • Loading branch information
dryabov committed Sep 27, 2014
1 parent 10bbdac commit bf8e0a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/js/twister.js
Expand Up @@ -59,8 +59,8 @@ window.Twister = function () {
}

function getRandomPassword() {
var k = 2; // number of 24bit randoms
return require('crypto').randomBytes(3 * k).toString('base64');
var r = require('crypto').randomBytes(4).readUInt32LE(0) | 0x80000000;
return r.toString(36);
}

settings.twisterdPath = settings.twisterdPath || appDir + ds + 'bin' + ds + 'twisterd';
Expand Down

0 comments on commit bf8e0a8

Please sign in to comment.