Created
March 6, 2018 15:13
-
-
Save ColinFendrick/496bae15ff15e7ac1ff7c5a66bd122e0 to your computer and use it in GitHub Desktop.
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
const unhash = num => { | |
let charpos = [] | |
let word = [] | |
let dictionary = 'acdfgilmnoprstuw' | |
for (i = 10; i > 0; i--) { | |
charpos[i] = (num % 23) | |
num = (num - charpos[i]) / 23 | |
word[i - 1] = dictionary.charAt(charpos[i]) | |
} | |
return word.join('') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment