diff --git a/include/blowfish/blowfish.h b/include/blowfish/blowfish.h index f03223a..1163208 100644 --- a/include/blowfish/blowfish.h +++ b/include/blowfish/blowfish.h @@ -13,23 +13,25 @@ #define MAXKEYBYTES 56 // 448 bits max #define N 16 -#define BYTE unsigned char -#define DWORD unsigned long -#define WORD unsigned int #if !defined(BLOWFISH_BLOWFISH_H_) #define BLOWFISH_BLOWFISH_H_ class Blowfish { private: - std::array PArray; - std::array, 4> Sboxes; - DWORD F(DWORD x); + std::array PArray; + std::array, 4> Sboxes; + uint32_t F(uint32_t x); public: + Blowfish() {} Blowfish(std::string const &key); - void encrypt(DWORD &xl, DWORD &xr); - void decrypt(DWORD &xl, DWORD &xr); + Blowfish(Blowfish const &) = delete; + + void initialize(std::string const &key); + + void encrypt(uint32_t &xl, uint32_t &xr); + void decrypt(uint32_t &xl, uint32_t &xr); }; #endif // BLOWFISH_BLOWFISH_H_