#ifndef AES_HPP_ #define AES_HPP_ #include #include #include #include #include "aesbase.hpp" class aes{ public: aes(std::string && KeyWord); aes(std::string & KeyWord); aes(std::vector && KeyWord); aes(std::vector & KeyWord); aes(std::vector && KeyWord); aes(std::vector & KeyWord); std::vector< std::vector > key(); std::vector< std::vector > key_inverse(); void set_key(std::vector && KeyWord); void set_key(std::vector & KeyWord); bool Init; unsigned value(); private: void _adjust_key_length(std::vector & KeyWord); std::vector< std::vector > _KeyRoundMatrix; std::vector< std::vector > _InvKeyRoundMat; const std::vector _RoundConst = {0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x1B,0x36}; const unsigned MatDim = 4; const unsigned Byte = 8; const unsigned RoundNumber = 9; const unsigned ByteSize = 16; const unsigned BitSize = 128; unsigned _Value; }; #endif