Skip to content
Snippets Groups Projects
Commit f13fd113 authored by Niels Möller's avatar Niels Möller
Browse files

New macro, ROTL32.

parent 60f3e677
No related branches found
No related tags found
No related merge requests found
2012-03-31 Niels Möller <nisse@lysator.liu.se>
* macros.h (ROTL32): New macro, to replace (almost) all other
rotation macros.
2012-03-30 Niels Möller <nisse@lysator.liu.se> 2012-03-30 Niels Möller <nisse@lysator.liu.se>
* nettle-internal.c (nettle_salsa20): Cipher struct for * nettle-internal.c (nettle_salsa20): Cipher struct for
......
...@@ -119,6 +119,8 @@ do { \ ...@@ -119,6 +119,8 @@ do { \
(dst) += (blocksize), \ (dst) += (blocksize), \
(src) += (blocksize)) ) (src) += (blocksize)) )
#define ROTL32(n,x) ((((x))<<(n)) | (((x))>>(32-(n))))
/* Requires that size >= 2 */ /* Requires that size >= 2 */
#define INCREMENT(size, ctr) \ #define INCREMENT(size, ctr) \
do { \ do { \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment