Move previous cryptopals work into an Erlang subfolder, start cryptopals in Python 3
[sandbox] / cryptopals-erlang / 01.02 / hex_tests.erl
1 -module(hex_tests).
2 -include_lib("eunit/include/eunit.hrl").
3
4 decode_test() -> ?assertEqual(
5     [1,35,69,103,137,171,205,239],
6     hex:decode("0123456789abcdef")).
7
8 encode_test() -> ?assertEqual(
9     "0123456789abcdef",
10     hex:encode([1,35,69,103,137,171,205,239])).
11
12 fixed_xor_test() -> ?assertEqual(
13     "746865206b696420646f6e277420706c6179",
14     hex:fixed_xor(
15         "1c0111001f010100061a024b53535009181c",
16         "686974207468652062756c6c277320657965")).