api.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001, 2002, 2004 Beeyond Software Holding BV
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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

Generated on Wed Aug 22 06:28:00 2007 for BeeCrypt by  doxygen 1.5.2