X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Farctwo.c;h=baf3c615e5376e4f6a1d1d33b3d1ddc4ab79b156;hb=159eae9ff30acac95b6d397f053df8cd6fca62a3;hp=ccaa4b6c2885949f1e444c9f48d04de3a38fda49;hpb=a42e0dae2fe2bc4d1166d572e8b5b447de9b9873;p=gnulib.git diff --git a/lib/arctwo.c b/lib/arctwo.c index ccaa4b6c2..baf3c615e 100644 --- a/lib/arctwo.c +++ b/lib/arctwo.c @@ -1,5 +1,5 @@ /* arctwo.c --- The RC2 cipher as described in RFC 2268. - * Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + * Copyright (C) 2003, 2004, 2005, 2006, 2008 Free Software Foundation, Inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published @@ -31,6 +31,8 @@ #include "arctwo.h" +#include "bitrotate.h" + static const uint8_t arctwo_sbox[] = { 217, 120, 249, 196, 25, 221, 181, 237, 40, 233, 253, 121, 74, 160, 216, 157, @@ -66,9 +68,6 @@ static const uint8_t arctwo_sbox[] = { 10, 166, 32, 104, 254, 127, 193, 173 }; -#define rotl16(x,n) (((x) << ((uint16_t)(n))) | ((x) >> (16 - (uint16_t)(n)))) -#define rotr16(x,n) (((x) >> ((uint16_t)(n))) | ((x) << (16 - (uint16_t)(n)))) - /* C89 compliant way to cast 'char' to 'unsigned char'. */ static inline unsigned char to_uchar (char ch)