1 /*********************************************************************
3 * Author: Brad Conte (brad AT bradconte.com)
5 * Disclaimer: This code is presented "as is" without any guarantees.
6 * Details: Defines the API for the corresponding Blowfish implementation.
7 *********************************************************************/
12 /*************************** HEADER FILES ***************************/
15 /****************************** MACROS ******************************/
16 #define BLOWFISH_BLOCK_SIZE 8 // Blowfish operates on 8 bytes at a time
18 /**************************** DATA TYPES ****************************/
19 typedef unsigned char BYTE; // 8-bit byte
20 typedef unsigned int WORD; // 32-bit word, change to "long" for 16-bit machines
27 /*********************** FUNCTION DECLARATIONS **********************/
28 void blowfish_key_setup(const BYTE user_key[], BLOWFISH_KEY *keystruct, size_t len);
29 void blowfish_encrypt(const BYTE in[], BYTE out[], const BLOWFISH_KEY *keystruct);
30 void blowfish_decrypt(const BYTE in[], BYTE out[], const BLOWFISH_KEY *keystruct);