Created
August 23, 2013 20:24
-
-
Save HomenSimpsor/6323616 to your computer and use it in GitHub Desktop.
How many letters can be generated from an n-word diceware phrase
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function howMany(n) { | |
var L = Math.pow(7776, n); | |
var num = Math.log(L); | |
var den = Math.log(26); | |
var total = num / den; | |
//console.log("result", L, num, den, total); | |
console.log("A diceware phrase of", n, "words will give", total, "letters") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment