summaryrefslogtreecommitdiff
path: root/lib/sha512.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-01-12 07:18:39 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-01-12 07:18:39 +0000
commit3f83336726c71154b6b51377ece24fc607a4f5d7 (patch)
tree49177ca829299a54e0c744a9679bd0b2a4205a2a /lib/sha512.h
parenta60af3a64fcf58fe4a5d824678b791a3092c6495 (diff)
downloadcoreutils-3f83336726c71154b6b51377ece24fc607a4f5d7.tar.xz
(struct sha512_ctx): Use a word buffer, not a byte buffer, so that we
don't need to worry about alignment.
Diffstat (limited to 'lib/sha512.h')
-rw-r--r--lib/sha512.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/sha512.h b/lib/sha512.h
index 3740de9c5..b90e71ad4 100644
--- a/lib/sha512.h
+++ b/lib/sha512.h
@@ -20,13 +20,7 @@
# define SHA512_H 1
# include <stdio.h>
-
-# if HAVE_INTTYPES_H
-# include <inttypes.h>
-# endif
-# if HAVE_STDINT_H || _LIBC
-# include <stdint.h>
-# endif
+# include <stdint.h>
/* Structure to save state of computation between the single steps. */
struct sha512_ctx
@@ -35,7 +29,7 @@ struct sha512_ctx
uint64_t total[2];
uint64_t buflen;
- char buffer[256];
+ uint64_t buffer[32];
};