00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00025 #ifndef _BEECRYPT_API_H
00026 #define _BEECRYPT_API_H
00027
00028 #if defined(_WIN32) && !defined(WIN32)
00029 # define WIN32 1
00030 #endif
00031
00032 #if WIN32
00033 # if !__CYGWIN32__
00034 # include "beecrypt/win.h"
00035 # else
00036 # include "beecrypt/gnu.h"
00037 # endif
00038 # ifdef BEECRYPT_DLL_EXPORT
00039 # define BEECRYPTAPI __declspec(dllexport)
00040 # else
00041 # define BEECRYPTAPI __declspec(dllimport)
00042 # endif
00043 # ifdef BEECRYPT_CXX_DLL_EXPORT
00044 # define BEECRYPTCXXAPI __declspec(dllexport)
00045 # define BEECRYPTCXXTEMPLATE
00046 # else
00047 # define BEECRYPTCXXAPI __declspec(dllimport)
00048 # define BEECRYPTCXXTEMPLATE extern
00049 # endif
00050 #else
00051 # include "beecrypt/gnu.h"
00052 # define BEECRYPTAPI
00053 # define BEECRYPTCXXAPI
00054 #endif
00055
00056 #ifndef ROTL32
00057 # define ROTL32(x, s) (((x) << (s)) | ((x) >> (32 - (s))))
00058 #endif
00059 #ifndef ROTR32
00060 # define ROTR32(x, s) (((x) >> (s)) | ((x) << (32 - (s))))
00061 #endif
00062 #ifndef ROTR64
00063 # define ROTR64(x, s) (((x) >> (s)) | ((x) << (64 - (s))))
00064 #endif
00065
00066 typedef uint8_t byte;
00067
00068 typedef int8_t javabyte;
00069 typedef int16_t javashort;
00070 typedef int32_t javaint;
00071 typedef int64_t javalong;
00072
00073 typedef uint16_t javachar;
00074
00075 #if (MP_WBITS == 64)
00076 typedef uint64_t mpw;
00077 typedef uint32_t mphw;
00078 #elif (MP_WBITS == 32)
00079 # if HAVE_UINT64_T
00080 # define HAVE_MPDW 1
00081 typedef uint64_t mpdw;
00082 # endif
00083 typedef uint32_t mpw;
00084 typedef uint16_t mphw;
00085 #else
00086 # error
00087 #endif
00088
00089 #endif