X-Git-Url: https://www.irasnyder.com/gitweb/?p=aes.git;a=blobdiff_plain;f=aes.hpp;h=5d2acd8346c505490ad48c43cbd83e5d9fc39b53;hp=43808d4433c6f048b8ab67c185ec6d5948740db5;hb=f06d505218bd3f8c05e9c64f0705bfa3066f665c;hpb=4bfbc559f6d8e186f8b95b48ae9603ee32dbb17d diff --git a/aes.hpp b/aes.hpp index 43808d4..5d2acd8 100644 --- a/aes.hpp +++ b/aes.hpp @@ -29,9 +29,21 @@ class AES byteArray decrypt (const byteArray& ciphertext) const; private: - unsigned int Nb; - unsigned int Nk; - unsigned int Nr; + /* Block size in words -- Always constant in AES. + * + * We also might as well make this static and share it between + * all instances of AES. */ + static const unsigned int Nb = 4; + + /* Key size in words -- can be 4, 6, or 8. + * + * Once it is set by the constructor, it will never change */ + const unsigned int Nk; + + /* Number of rounds -- depends on key size. + * + * Once it is set by the constructor, it will never change */ + const unsigned int Nr; wordArray keySchedule;