4 % TODO Scoring function to identify which string is English
6 get_xored_possibilities() ->
7 Base = hex:decode("1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736"),
8 XorBytes = lists:seq(0,255),
9 lists:map(fun(XorByte) -> hex:single_byte_xor(XorByte,Base) end, XorBytes).
11 get_comparison_text() ->
12 {ok, Data} = file:read_file("1984.html"),
15 print_all(List) -> lists:map(fun(S) -> io:format("~s~n",[S]) end, List).
17 run() -> print_all(get_xored_possibilities()).