00001 /* blowfish.h: header for blowfish.c 00002 * 00003 * Copyright (C) 1997 Robey Pointer 00004 * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Eggheads Development Team 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License 00008 * as published by the Free Software Foundation; either version 2 00009 * of the License, or (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00019 * 00020 * $Id: blowfish.h,v 1.8 2003-12-18 06:50:47 wcc Exp $ 00021 */ 00022 00023 #ifndef _EGG_MOD_BLOWFISH_BLOWFISH_H_ 00024 #define _EGG_MOD_BLOWFISH_BLOWFISH_H_ 00025 00026 #define MAXKEYBYTES 56 /* 448 bits */ 00027 #define bf_N 16 00028 #define noErr 0 00029 #define DATAERROR -1 00030 #define KEYBYTES 8 00031 00032 union aword { 00033 u_int32_t word; 00034 u_int8_t byte[4]; 00035 struct { 00036 #ifdef WORDS_BIGENDIAN 00037 unsigned int byte0:8; 00038 unsigned int byte1:8; 00039 unsigned int byte2:8; 00040 unsigned int byte3:8; 00041 #else /* WORDS_BIGENDIAN */ 00042 unsigned int byte3:8; 00043 unsigned int byte2:8; 00044 unsigned int byte1:8; 00045 unsigned int byte0:8; 00046 #endif /* WORDS_BIGENDIAN */ 00047 } w; 00048 }; 00049 00050 #endif /* !_EGG_MOD_BLOWFISH_BLOWFISH_H_ */