header files updated with uint32_t

This commit is contained in:
avinal
2021-03-07 23:46:18 +05:30
parent 279aaf34a4
commit ccc7e8b1e3

View File

@@ -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<DWORD, N + 2> PArray;
std::array<std::array<DWORD, 256>, 4> Sboxes;
DWORD F(DWORD x);
std::array<uint32_t, N + 2> PArray;
std::array<std::array<uint32_t, 256>, 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_