From: Niels Möller Date: Sat, 31 Mar 2012 19:23:19 +0000 (+0200) Subject: New macro, ROTL32. X-Git-Tag: nettle_2.5_release_20120707~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f13fd113b07c351e8024ec85fa339b64c31994cc;p=thirdparty%2Fnettle.git New macro, ROTL32. --- diff --git a/ChangeLog b/ChangeLog index 0b650a5e..483f337f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-03-31 Niels Möller + + * macros.h (ROTL32): New macro, to replace (almost) all other + rotation macros. + 2012-03-30 Niels Möller * nettle-internal.c (nettle_salsa20): Cipher struct for diff --git a/macros.h b/macros.h index 9a57b150..f12deab4 100644 --- a/macros.h +++ b/macros.h @@ -119,6 +119,8 @@ do { \ (dst) += (blocksize), \ (src) += (blocksize)) ) +#define ROTL32(n,x) ((((x))<<(n)) | (((x))>>(32-(n)))) + /* Requires that size >= 2 */ #define INCREMENT(size, ctr) \ do { \