* java/lang/natDouble.cc (toString): Added parens.
[official-gcc.git] / libjava / gnu / gcj / io / shs.h
blobc4b2d5a30b02e615bb893b2388683a3435990221
1 /* --------------------------------- SHS.H ------------------------------- */
3 /*
4 * NIST proposed Secure Hash Standard.
6 * Written 2 September 1992, Peter C. Gutmann.
7 * This implementation placed in the public domain.
9 * Comments to pgut1@cs.aukuni.ac.nz
12 /* Useful defines/typedefs */
14 #ifndef SHS_H
15 #define SHS_H
17 #include<config.h>
18 #if HAVE_INTTYPES_H
19 # include <inttypes.h>
20 #else
21 # if HAVE_STDINT_H
22 # include <stdint.h>
23 # else
24 typedef unsigned int uint8_t __attribute__((mode(QI)));
25 /* This is a blatant hack: on Solaris 2.5, pthread.h defines uint32_t
26 in pthread.h, which we sometimes include. We protect our
27 definition the same way Solaris 2.5 does, to avoid redefining it. */
28 # ifndef _UINT32_T
29 typedef unsigned int uint32_t __attribute__((mode(SI)));
30 # endif
31 # endif
32 #endif
34 #define PROTO
36 /* The SHS block size and message digest sizes, in bytes */
38 #define SHS_BLOCKSIZE 64
39 #define SHS_DIGESTSIZE 20
41 /* The structure for storing SHS info */
43 typedef struct {
44 uint32_t digest [5]; /* Message digest */
45 uint32_t countLo, countHi; /* 64-bit bit count */
46 uint32_t data [16]; /* SHS data buffer */
47 } SHS_INFO;
49 /* Turn off prototypes if requested */
50 #if (defined(NOPROTO) && defined(PROTO))
51 # undef PROTO
52 #endif
54 /* Used to remove arguments in function prototypes for non-ANSI C */
55 #ifdef PROTO
56 # define OF(a) a
57 #else /* !PROTO */
58 # define OF(a) ()
59 #endif /* ?PROTO */
61 #define local static
63 void shsInit OF((SHS_INFO *shsInfo));
64 void shsUpdate OF((SHS_INFO *shsInfo, uint8_t *buffer, int count));
65 void shsFinal OF((SHS_INFO *shsInfo));
67 #endif