X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=aes.cpp;h=dff959e2a05b1a43fd32f2fec1d9e561b0f44afc;hb=32b64c22ce1b63a4e80ef12097b7ff0c413f3b73;hp=e4aef0bb2fc81e0b8da5fc95dec2cf20975483d7;hpb=4bfbc559f6d8e186f8b95b48ae9603ee32dbb17d;p=aes.git diff --git a/aes.cpp b/aes.cpp index e4aef0b..dff959e 100644 --- a/aes.cpp +++ b/aes.cpp @@ -9,8 +9,7 @@ static byte xtimes (const byte bx); static void printState (byteArray &bytes, std::string name); AES::AES (const byteArray& key) - : Nb(4) // This is constant in AES - , Nk(key.size() / 4) // This can be either 4, 6, or 8 (128, 192, or 256 bit) + : Nk(key.size() / 4) // This can be either 4, 6, or 8 (128, 192, or 256 bit) , Nr(Nk + Nb + 2) , keySchedule(Nb * (Nr+1), 0x00000000) { @@ -422,10 +421,7 @@ void AES::AddRoundKey (byteArray& state, const wordArray& w) const byteArray wBytes = word2bytes (w[i]); for (j=0; j