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