X-Git-Url: https://code.kerkeslager.com/?p=sandbox;a=blobdiff_plain;f=cryptopals%2F01.03%2Fmain.erl;fp=cryptopals%2F01.03%2Fmain.erl;h=0000000000000000000000000000000000000000;hp=034b0d9d71878000859ddda1d623414f909b0d13;hb=b37c633b0ba51e497920762fa2eb4d732ebca291;hpb=545381e1397107d4ab00d2e54d85d3e11d98e4f1 diff --git a/cryptopals/01.03/main.erl b/cryptopals/01.03/main.erl deleted file mode 100644 index 034b0d9..0000000 --- a/cryptopals/01.03/main.erl +++ /dev/null @@ -1,17 +0,0 @@ --module(main). --export([run/0]). - -% TODO Scoring function to identify which string is English - -get_xored_possibilities() -> - Base = hex:decode("1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736"), - XorBytes = lists:seq(0,255), - lists:map(fun(XorByte) -> hex:single_byte_xor(XorByte,Base) end, XorBytes). - -get_comparison_text() -> - {ok, Data} = file:read_file("1984.html"), - Data. - -print_all(List) -> lists:map(fun(S) -> io:format("~s~n",[S]) end, List). - -run() -> print_all(get_xored_possibilities()).