X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/fe6657c961b01ec72e9f35f4c3d96b11b31cf09c..45c0fd363937c6e9b05da04a9167e9912c05ca0c:/tests/xtea-test.c diff --git a/tests/xtea-test.c b/tests/xtea-test.c index 4880905..49632b1 100644 --- a/tests/xtea-test.c +++ b/tests/xtea-test.c @@ -15,10 +15,10 @@ if (N>0) { y+= (z<<4 ^ z>>5) + z ^ sum + k[sum&3], sum+=DELTA, z+= (y<<4 ^ y>>5) + y ^ sum + k[sum>>11 &3] ; - } + } else { - /* decoding */ + /* decoding */ unsigned long sum=DELTA*(-N) ; while (sum) z-= (y<<4 ^ y>>5) + y ^ sum + k[sum>>11 &3], @@ -55,6 +55,6 @@ int main(void) tean(p, k, 32); printf("%08lx%08lx;\n", p[0], p[1]); } - + return (0); }