diff options
Diffstat (limited to 'utils/zenutils/libraries/beecrypt-4.1.2/beecrypt/api.h')
-rwxr-xr-x | utils/zenutils/libraries/beecrypt-4.1.2/beecrypt/api.h | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/utils/zenutils/libraries/beecrypt-4.1.2/beecrypt/api.h b/utils/zenutils/libraries/beecrypt-4.1.2/beecrypt/api.h new file mode 100755 index 0000000000..f5ef7ff04a --- /dev/null +++ b/utils/zenutils/libraries/beecrypt-4.1.2/beecrypt/api.h | |||
@@ -0,0 +1,89 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2001, 2002, 2004 Beeyond Software Holding BV | ||
3 | * | ||
4 | * This library is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU Lesser General Public | ||
6 | * License as published by the Free Software Foundation; either | ||
7 | * version 2.1 of the License, or (at your option) any later version. | ||
8 | * | ||
9 | * This library is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | * Lesser General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU Lesser General Public | ||
15 | * License along with this library; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | * | ||
18 | */ | ||
19 | |||
20 | /*!\file api.h | ||
21 | * \brief BeeCrypt API, portability headers. | ||
22 | * \author Bob Deblier <bob.deblier@pandora.be> | ||
23 | */ | ||
24 | |||
25 | #ifndef _BEECRYPT_API_H | ||
26 | #define _BEECRYPT_API_H | ||
27 | |||
28 | #if defined(_WIN32) && !defined(WIN32) | ||
29 | # define WIN32 1 | ||
30 | #endif | ||
31 | |||
32 | #if WIN32 | ||
33 | # if !__CYGWIN32__ | ||
34 | # include "beecrypt/win.h" | ||
35 | # else | ||
36 | # include "beecrypt/gnu.h" | ||
37 | # endif | ||
38 | # ifdef BEECRYPT_DLL_EXPORT | ||
39 | # define BEECRYPTAPI //__declspec(dllexport) | ||
40 | # else | ||
41 | # define BEECRYPTAPI //__declspec(dllimport) | ||
42 | # endif | ||
43 | # ifdef BEECRYPT_CXX_DLL_EXPORT | ||
44 | # define BEECRYPTCXXAPI //__declspec(dllexport) | ||
45 | # define BEECRYPTCXXTEMPLATE | ||
46 | # else | ||
47 | # define BEECRYPTCXXAPI //__declspec(dllimport) | ||
48 | # define BEECRYPTCXXTEMPLATE extern | ||
49 | # endif | ||
50 | #else | ||
51 | # include "beecrypt/gnu.h" | ||
52 | # define BEECRYPTAPI | ||
53 | # define BEECRYPTCXXAPI | ||
54 | #endif | ||
55 | |||
56 | #ifndef ROTL32 | ||
57 | # define ROTL32(x, s) (((x) << (s)) | ((x) >> (32 - (s)))) | ||
58 | #endif | ||
59 | #ifndef ROTR32 | ||
60 | # define ROTR32(x, s) (((x) >> (s)) | ((x) << (32 - (s)))) | ||
61 | #endif | ||
62 | #ifndef ROTR64 | ||
63 | # define ROTR64(x, s) (((x) >> (s)) | ((x) << (64 - (s)))) | ||
64 | #endif | ||
65 | |||
66 | typedef uint8_t byte; | ||
67 | |||
68 | typedef int8_t javabyte; | ||
69 | typedef int16_t javashort; | ||
70 | typedef int32_t javaint; | ||
71 | typedef int64_t javalong; | ||
72 | |||
73 | typedef uint16_t javachar; | ||
74 | |||
75 | #if (MP_WBITS == 64) | ||
76 | typedef uint64_t mpw; | ||
77 | typedef uint32_t mphw; | ||
78 | #elif (MP_WBITS == 32) | ||
79 | # if HAVE_UINT64_T | ||
80 | # define HAVE_MPDW 1 | ||
81 | typedef uint64_t mpdw; | ||
82 | # endif | ||
83 | typedef uint32_t mpw; | ||
84 | typedef uint16_t mphw; | ||
85 | #else | ||
86 | # error | ||
87 | #endif | ||
88 | |||
89 | #endif | ||