VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto/Sha1.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Crypto/Sha1.h')
-rw-r--r--src/Crypto/Sha1.h80
1 files changed, 0 insertions, 80 deletions
diff --git a/src/Crypto/Sha1.h b/src/Crypto/Sha1.h
deleted file mode 100644
index 130a1a41..00000000
--- a/src/Crypto/Sha1.h
+++ /dev/null
@@ -1,80 +0,0 @@
1/*
2 ---------------------------------------------------------------------------
3 Copyright (c) 2002, Dr Brian Gladman, Worcester, UK. All rights reserved.
4
5 LICENSE TERMS
6
7 The free distribution and use of this software is allowed (with or without
8 changes) provided that:
9
10 1. source code distributions include the above copyright notice, this
11 list of conditions and the following disclaimer;
12
13 2. binary distributions include the above copyright notice, this list
14 of conditions and the following disclaimer in their documentation;
15
16 3. the name of the copyright holder is not used to endorse products
17 built using this software without specific written permission.
18
19 DISCLAIMER
20
21 This software is provided 'as is' with no explicit or implied warranties
22 in respect of its properties, including, but not limited to, correctness
23 and/or fitness for purpose.
24 ---------------------------------------------------------------------------
25 Issue Date: 26/08/2003
26*/
27
28#ifndef _SHA1_H
29#define _SHA1_H
30
31#include <limits.h>
32#include "Common/Tcdefs.h"
33
34#define SHA1_BLOCK_SIZE 64
35#define SHA1_DIGEST_SIZE 20
36
37#if defined(__cplusplus)
38extern "C"
39{
40#endif
41
42/* define an unsigned 32-bit type */
43
44#if defined(_MSC_VER)
45 typedef unsigned __int32 sha1_32t;
46#elif defined(ULONG_MAX) && ULONG_MAX == 0xfffffffful
47 typedef unsigned __int32 sha1_32t;
48#elif defined(UINT_MAX) && UINT_MAX == 0xffffffff
49 typedef unsigned int sha1_32t;
50#else
51# error Please define sha1_32t as an unsigned 32 bit type in sha1.h
52#endif
53
54/* type to hold the SHA256 context */
55
56typedef struct
57{ sha1_32t count[2];
58 sha1_32t hash[5];
59 sha1_32t wbuf[16];
60} sha1_ctx;
61
62/* Note that these prototypes are the same for both bit and */
63/* byte oriented implementations. However the length fields */
64/* are in bytes or bits as appropriate for the version used */
65/* and bit sequences are input as arrays of bytes in which */
66/* bit sequences run from the most to the least significant */
67/* end of each byte */
68
69void sha1_compile(sha1_ctx ctx[1]);
70
71void sha1_begin(sha1_ctx ctx[1]);
72void sha1_hash(const unsigned char data[], unsigned __int32 len, sha1_ctx ctx[1]);
73void sha1_end(unsigned char hval[], sha1_ctx ctx[1]);
74void sha1(unsigned char hval[], const unsigned char data[], unsigned __int32 len);
75
76#if defined(__cplusplus)
77}
78#endif
79
80#endif