diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2018-06-17 14:35:37 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2018-06-17 14:38:05 -0700 |
commit | 0d45ec7c033c165ad73a6509c7fa84aa67edf4ea (patch) | |
tree | c0177a94dcfb05477b64bc2cbbe8576753b74907 /lib/md4.c | |
parent | b80cc10aeb8dd2b94bf0be2a5d0b2efb95965e24 (diff) | |
download | gnulib-0d45ec7c033c165ad73a6509c7fa84aa67edf4ea.tar.gz |
crypto: use byteswap
* lib/md4.c, lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c:
* lib/sm3.c: Include <byteswap.h>.
(SWAP): Use its macros rather than reinventing the wheel.
* modules/crypto/md4, modules/crypto/md5-buffer:
* modules/crypto/sha1-buffer, modules/crypto/sha256-buffer:
* modules/crypto/sha512-buffer, modules/crypto/sm3:
(Depends-on): Add byteswap.
Diffstat (limited to 'lib/md4.c')
-rw-r--r-- | lib/md4.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -33,9 +33,9 @@ # include "unlocked-io.h" #endif +#include <byteswap.h> #ifdef WORDS_BIGENDIAN -# define SWAP(n) \ - (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24)) +# define SWAP(n) bswap_32 (n) #else # define SWAP(n) (n) #endif |