projects
/
aes.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Const-ify Nb, Nk, Nr
[aes.git]
/
aes.cpp
diff --git
a/aes.cpp
b/aes.cpp
index
e4aef0b
..
883d3b3
100644
(file)
--- 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)
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)
{
, Nr(Nk + Nb + 2)
, keySchedule(Nb * (Nr+1), 0x00000000)
{