From ccc7e8b1e318d3104ec46e7bee13d4b3ac591d89 Mon Sep 17 00:00:00 2001 From: avinal <185067@nith.ac.in> Date: Sun, 7 Mar 2021 23:46:18 +0530 Subject: [PATCH] header files updated with uint32_t --- include/blowfish/blowfish.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) 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_