Created
April 14, 2018 16:36
-
-
Save KamilLelonek/0ff6bf413d05889f105d7ebae0d29423 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
~r/.{1,11}/ | |
|> Regex.scan(entropy) | |
|> List.flatten() | |
|> Enum.map(fn part -> | |
index = String.to_integer(part, 2) | |
Enum.at(@words, index) | |
end) | |
|> Enum.join(" ") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment