Commit 8149d146 authored by Niels Möller's avatar Niels Möller

Moved ROTL64 macro to macros.h.

parent d20990fd
2012-11-12 Niels Möller <nisse@lysator.liu.se>
* macros.h (ROTL64): New macro, moved from...
* sha512-compress.c (ROTL64): ... old location, deleted.
* serpent-internal.h [HAVE_NATIVE_64_BIT] (DROTL32): Renamed from...
(ROTL64): ... old name.
(DRSHIFT32): Renamed from ...
......
......@@ -119,7 +119,9 @@ do { \
(dst) += (blocksize), \
(src) += (blocksize)) )
#define ROTL32(n,x) ((((x))<<(n)) | (((x))>>(32-(n))))
#define ROTL32(n,x) (((x)<<(n)) | ((x)>>(32-(n))))
#define ROTL64(n,x) (((x)<<(n)) | ((x)>>(64-(n))))
/* Requires that size >= 2 */
#define INCREMENT(size, ctr) \
......
......@@ -38,8 +38,6 @@
/* A block, treated as a sequence of 64-bit words. */
#define SHA512_DATA_LENGTH 16
#define ROTL64(n,x) ((x)<<(n) | ((x)>>(64-(n))))
/* The SHA512 functions. The Choice function is the same as the SHA1
function f1, and the majority function is the same as the SHA1 f3
function, and the same as for SHA256. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment