Added SILC Thread Queue API
[silc.git] / lib / silccrypt / sha512_internal.h
1 /*
2
3   sha512_internal.h
4
5   Author: Pekka Riikonen <priikone@silcnet.org>
6
7   Copyright (C) 2007 Pekka Riikonen
8
9   This program is free software; you can redistribute it and/or modify
10   it under the terms of the GNU General Public License as published by
11   the Free Software Foundation; version 2 of the License.
12
13   This program is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   GNU General Public License for more details.
17
18 */
19
20 #ifndef SHA512_INTERNAL_H
21 #define SHA512_INTERNAL_H
22
23 typedef struct {
24     SilcUInt64 length;
25     SilcUInt64 state[8];
26     SilcUInt32 curlen;
27     unsigned char buf[128];
28 } sha512_state;
29
30 int sha512_init(sha512_state * md);
31 int sha512_process(sha512_state * md, const unsigned char *in,
32                    unsigned long inlen);
33 int sha512_done(sha512_state * md, unsigned char *hash);
34 void sha512_transform(SilcUInt64 *state, unsigned char *buf);
35
36 #endif /* SHA512_INTERNAL_H */