recognize new archive, audio, image formats; give audio files a separate color
[platform/upstream/coreutils.git] / lib / sha512.h
index 5a2b5ce..995511e 100644 (file)
@@ -1,6 +1,6 @@
 /* Declarations of functions and data types used for SHA512 and SHA384 sum
    library functions.
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the
 
 # include <stdio.h>
 
-# if HAVE_INTTYPES_H
-#  include <inttypes.h>
-# endif
-# if HAVE_STDINT_H || _LIBC
-#  include <stdint.h>
-# endif
-
-typedef uint64_t sha512_uint64;
-
+# include "u64.h"
 
 /* Structure to save state of computation between the single steps.  */
 struct sha512_ctx
 {
-  sha512_uint64 state[8];
+  u64 state[8];
 
-  sha512_uint64 total[2];
-  sha512_uint64 buflen;
-  char buffer[256];
+  u64 total[2];
+  size_t buflen;
+  u64 buffer[32];
 };
 
 
@@ -94,6 +86,4 @@ extern int sha384_stream (FILE *stream, void *resblock);
 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