diff --git a/include/blowfish/blowfish.hpp b/include/blowfish/blowfish.hpp new file mode 100644 index 0000000..e5730b3 --- /dev/null +++ b/include/blowfish/blowfish.hpp @@ -0,0 +1,33 @@ +/** + * @file blowfish.hpp + * @author Avinal Kumar + * @since February 15, 2021 + * + * Blowfish Algorithm Header File + */ + +#define MAXKEYBYTES 56 // 448 bits max + +#define DWORD unsigned long +#define WORD unsigned int +#define BYTE unsigned char + +#if !defined(BLOWFISH_HPP) +#define BLOWFISH_HPP + +#include +#include + +class blowfish { +private: + std::array PArray; + std::array, 4> Sboxes; + DWORD F(DWORD x); + +public: + blowfish(BYTE *key, WORD keylength); + void encrypt(DWORD *xl, DWORD *xr); + void decrypt(DWORD *xl, DWORD *xr); +}; + +#endif // BLOWFISH_HPP