1 USING: crypto errors kernel test strings ;
4 [ T{ no-xor-key f } ] [ [ "" dup xor-crypt ] catch ] unit-test
5 [ T{ no-xor-key f } ] [ [ { } dup xor-crypt ] catch ] unit-test
6 [ T{ no-xor-key f } ] [ [ V{ } dup xor-crypt ] catch ] unit-test
7 [ T{ no-xor-key f } ] [ [ "" "asdf" dupd xor-crypt xor-crypt ] catch ] unit-test
10 [ { 0 0 0 0 0 0 0 } ] [ "abcdefg" dup xor-crypt ] unit-test
12 [ { 15 15 15 15 } ] [ { 10 10 10 10 } { 5 5 5 5 } xor-crypt ] unit-test
14 [ "asdf" ] [ "key" "asdf" dupd xor-crypt xor-crypt >string ] unit-test
15 [ "" ] [ "key" "" xor-crypt >string ] unit-test
16 [ "a longer message...!" ] [
18 "a longer message...!" dupd xor-crypt xor-crypt >string
20 [ "a longer message...!" ] [
21 "a very long key, longer than the message even."
22 "a longer message...!" dupd xor-crypt xor-crypt >string