summaryrefslogtreecommitdiff
path: root/utils/zenutils/libraries/beecrypt-4.1.2/beecrypt/api.h
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2008-07-11 15:50:46 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2008-07-11 15:50:46 +0000
commit14c7f45cdae826f88dc539c8c38dd95caf305731 (patch)
tree832da054b7cfb2dc6fd63339af736625f31d21aa /utils/zenutils/libraries/beecrypt-4.1.2/beecrypt/api.h
parent7c84ede3781c27db73403bd6302f320c76a58c8c (diff)
downloadrockbox-14c7f45cdae826f88dc539c8c38dd95caf305731.tar.gz
rockbox-14c7f45cdae826f88dc539c8c38dd95caf305731.zip
Add zook's ZenUtils to SVN
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18010 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/zenutils/libraries/beecrypt-4.1.2/beecrypt/api.h')
-rwxr-xr-xutils/zenutils/libraries/beecrypt-4.1.2/beecrypt/api.h89
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
66typedef uint8_t byte;
67
68typedef int8_t javabyte;
69typedef int16_t javashort;
70typedef int32_t javaint;
71typedef int64_t javalong;
72
73typedef uint16_t javachar;
74
75#if (MP_WBITS == 64)
76typedef uint64_t mpw;
77typedef uint32_t mphw;
78#elif (MP_WBITS == 32)
79# if HAVE_UINT64_T
80# define HAVE_MPDW 1
81typedef uint64_t mpdw;
82# endif
83typedef uint32_t mpw;
84typedef uint16_t mphw;
85#else
86# error
87#endif
88
89#endif