Dusk Wrote: Spoiler @str = qw(67 29 -71 1 85 -78 -22 58 10 -70 61 14 -56 -15 56 7 -63 2 -6 9 2 -14 -4 20 61 4 -56 -18 10 0 46 20 -67 4 59 -13 -63 14 -4 50 15 -57 52 -2 -65 -2 4 55 11 -78 25 4 -8 -2 -4 52 1 -51 8 -14 10 6 -23 -5 28 54 -10 -66 71 1 -50 -7 -21 22 59 2 -57 52 -14 -42 2 -19 7 55 16 -56 -15 56 16 -79 16 47 10 -70 61 14 -56 -15 56 1 -51 8 -14 10 6 -23 -5 77 1 -53 -25 6 19 -13 -12 68 15 -56 -15 56 -2 -52 -2 5 -18 93 -79 84 -59 -33 -4 18 -14 16 47 30 -3 -82 55 -60 -7 6 6 9 -22 82 -18 -46 4 46 15 -56 -19 12 63 -1 -76 -6 4 20 -12 61); $curr = $val = shift @str; print chr($curr ^= ($val += $_)) foreach @str, "\n"; "123.pl" 3 lines, 607 characters -bash-3.00$ perl 123.pl #: One of the languages where you have to make private functions in order to avoid the use of the function outside the class. Because C#-hackers are that stupid. ic (too lazy to install C# compiler)
(defun decode (lst) (loop for elt in lst for diff = 0 then (+ diff elt) for n = elt then (logxor n diff) do (princ (int-char n)))) (setf x '(67 29 -71 1 85 -78 -22 58 10 -70 61 14 -56 -15 56 7 -63 2 -6 9 2 -14 -4 20 61 4 -56 -18 10 0 46 20 -67 4 59 -13 -63 14 -4 50 15 -57 52 -2 -65 -2 4 55 11 -78 25 4 -8 -2 -4 52 1 -51 8 -14 10 6 -23 -5 28 54 -10 -66 71 1 -50 -7 -21 22 59 2 -57 52 -14 -42 2 -19 7 55 16 -56 -15 56 16 -79 16 47 10 -70 61 14 -56 -15 56 1 -51 8 -14 10 6 -23 -5 77 1 -53 -25 6 19 -13 -12 68 15 -56 -15 56 -2 -52 -2 5 -18 93 -79 84 -59 -33 -4 18 -14 16 47 30 -3 -82 55 -60 -7 6 6 9 -22 82 -18 -46 4 46 15 -56 -19 12 63 -1 -76 -6 4 20 -12 61)) (decode x)