aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/aesGladman/sha1.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/aesGladman/sha1.h')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/aesGladman/sha1.h136
1 files changed, 68 insertions, 68 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/aesGladman/sha1.h b/libraries/irrlicht-1.8/source/Irrlicht/aesGladman/sha1.h
index 0b39f5c..53ea19a 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/aesGladman/sha1.h
+++ b/libraries/irrlicht-1.8/source/Irrlicht/aesGladman/sha1.h
@@ -1,68 +1,68 @@
1/* 1/*
2 --------------------------------------------------------------------------- 2 ---------------------------------------------------------------------------
3 Copyright (c) 2002, Dr Brian Gladman < >, Worcester, UK. 3 Copyright (c) 2002, Dr Brian Gladman < >, Worcester, UK.
4 All rights reserved. 4 All rights reserved.
5 5
6 LICENSE TERMS 6 LICENSE TERMS
7 7
8 The free distribution and use of this software in both source and binary 8 The free distribution and use of this software in both source and binary
9 form is allowed (with or without changes) provided that: 9 form is allowed (with or without changes) provided that:
10 10
11 1. distributions of this source code include the above copyright 11 1. distributions of this source code include the above copyright
12 notice, this list of conditions and the following disclaimer; 12 notice, this list of conditions and the following disclaimer;
13 13
14 2. distributions in binary form include the above copyright 14 2. distributions in binary form include the above copyright
15 notice, this list of conditions and the following disclaimer 15 notice, this list of conditions and the following disclaimer
16 in the documentation and/or other associated materials; 16 in the documentation and/or other associated materials;
17 17
18 3. the copyright holder's name is not used to endorse products 18 3. the copyright holder's name is not used to endorse products
19 built using this software without specific written permission. 19 built using this software without specific written permission.
20 20
21 ALTERNATIVELY, provided that this notice is retained in full, this product 21 ALTERNATIVELY, provided that this notice is retained in full, this product
22 may be distributed under the terms of the GNU General Public License (GPL), 22 may be distributed under the terms of the GNU General Public License (GPL),
23 in which case the provisions of the GPL apply INSTEAD OF those given above. 23 in which case the provisions of the GPL apply INSTEAD OF those given above.
24 24
25 DISCLAIMER 25 DISCLAIMER
26 26
27 This software is provided 'as is' with no explicit or implied warranties 27 This software is provided 'as is' with no explicit or implied warranties
28 in respect of its properties, including, but not limited to, correctness 28 in respect of its properties, including, but not limited to, correctness
29 and/or fitness for purpose. 29 and/or fitness for purpose.
30 --------------------------------------------------------------------------- 30 ---------------------------------------------------------------------------
31 Issue Date: 26/08/2003 31 Issue Date: 26/08/2003
32*/ 32*/
33 33
34#ifndef _SHA1_H 34#ifndef _SHA1_H
35#define _SHA1_H 35#define _SHA1_H
36 36
37#include <limits.h> 37#include <limits.h>
38 38
39#define SHA1_BLOCK_SIZE 64 39#define SHA1_BLOCK_SIZE 64
40#define SHA1_DIGEST_SIZE 20 40#define SHA1_DIGEST_SIZE 20
41 41
42/* define an unsigned 32-bit type */ 42/* define an unsigned 32-bit type */
43 43
44#if UINT_MAX == 0xffffffff 44#if UINT_MAX == 0xffffffff
45 typedef unsigned int sha1_32t; 45 typedef unsigned int sha1_32t;
46#elif ULONG_MAX == 0xffffffff 46#elif ULONG_MAX == 0xffffffff
47 typedef unsigned long sha1_32t; 47 typedef unsigned long sha1_32t;
48#else 48#else
49#error Please define sha1_32t as an unsigned 32 bit type in sha2.h 49#error Please define sha1_32t as an unsigned 32 bit type in sha2.h
50#endif 50#endif
51 51
52/* type to hold the SHA256 context */ 52/* type to hold the SHA256 context */
53 53
54typedef struct 54typedef struct
55{ sha1_32t count[2]; 55{ sha1_32t count[2];
56 sha1_32t hash[5]; 56 sha1_32t hash[5];
57 sha1_32t wbuf[16]; 57 sha1_32t wbuf[16];
58} sha1_ctx; 58} sha1_ctx;
59 59
60void sha1_compile(sha1_ctx ctx[1]); 60void sha1_compile(sha1_ctx ctx[1]);
61 61
62void sha1_begin(sha1_ctx ctx[1]); 62void sha1_begin(sha1_ctx ctx[1]);
63void sha1_hash(const unsigned char data[], unsigned long len, sha1_ctx ctx[1]); 63void sha1_hash(const unsigned char data[], unsigned long len, sha1_ctx ctx[1]);
64void sha1_end(unsigned char hval[], sha1_ctx ctx[1]); 64void sha1_end(unsigned char hval[], sha1_ctx ctx[1]);
65void sha1(unsigned char hval[], const unsigned char data[], unsigned long len); 65void sha1(unsigned char hval[], const unsigned char data[], unsigned long len);
66 66
67#endif 67#endif
68 68