]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/libcrypto/include/sha1.h
update
[l4.git] / l4 / pkg / libcrypto / include / sha1.h
1 /*
2  * \brief   Header SHA1 functions.
3  * \date    2006-07-26
4  * \author  Carsten Weinhold <weinhold@os.inf.tu-dresden.de>
5  */
6 /*
7  * Copyright (C) 2006  Carsten Weinhold <weinhold@os.inf.tu-dresden.de>
8  * Technische Universitaet Dresden, Operating Systems Research Group
9  *
10  * This file is part of the libcrypto package, which is distributed under
11  * the  terms  of the  GNU General Public Licence 2.  Please see the
12  * COPYING file for details.
13  */
14
15 #ifndef __CRYPTO_SHA_H
16 #define __CRYPTO_SHA_H
17
18 #include "private/misc.h"
19
20 CRYPTO_EXTERN_C_BEGIN
21
22 /* generic includes */
23 #include <sys/types.h>
24
25 /* local includes */
26 #include "private/digest.h"
27 #include "private/sha1_linux.h"
28 #include "private/sha1.h"
29 #include "private/sha.h"
30 #include "private/sha_openssl.h"
31
32 /*
33  * **************************************************************** 
34  */
35
36 /* SHA-1 uses 160 bit hashes */
37 #define SHA1_DIGEST_SIZE 20
38
39 /*
40  * **************************************************************** 
41  */
42
43 typedef union
44 {
45     SHA1Context       __sha1_ref_ctx;
46     struct sha1_ctx   __sha1_linux_ctx;    
47     struct shash_desc __sha1_linux_new_ctx;
48     struct Context    __sha1_oslo_ctx;
49     SHA_CTX           __sha1_openssl;
50 } crypto_sha1_ctx_t;
51
52 typedef char crypto_sha1_digest_t[SHA1_DIGEST_SIZE];
53
54 /*
55  * **************************************************************** 
56  */
57
58 extern crypto_digest_setup_fn_t  sha1_digest_setup;
59 extern crypto_digest_update_fn_t sha1_digest_update;
60 extern crypto_digest_final_fn_t  sha1_digest_final;
61
62 CRYPTO_EXTERN_C_END
63
64 #endif /* __CRYPTO_SHA_H */
65