# include <stdio.h>
-# if HAVE_INTTYPES_H
-# include <inttypes.h>
-# endif
-# if HAVE_STDINT_H || _LIBC
-# include <stdint.h>
-# endif
+# include "u64.h"
/* Structure to save state of computation between the single steps. */
struct sha512_ctx
{
- uint64_t state[8];
+ u64 state[8];
- uint64_t total[2];
- uint64_t buflen;
- char buffer[256];
+ u64 total[2];
+ size_t buflen;
+ u64 buffer[32];
};
extern void *sha512_buffer (const char *buffer, size_t len, void *resblock);
extern void *sha384_buffer (const char *buffer, size_t len, void *resblock);
-# define rol64(x,n) ( ((x) << (n)) | ((x) >> (64-(n))) )
-
#endif