summaryrefslogtreecommitdiff
path: root/test.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2016-12-04 13:04:12 -0500
committerJeffrey Walton <noloader@gmail.com>2016-12-04 13:04:12 -0500
commitacf15c21c0a3f43c24502766209627edae9d4ea0 (patch)
treeeb30f92203d250055d5b59294ecaf2ab7e5f87b7 /test.cpp
parentb4b1b530c13b6b6bac864cd205dae4f2c56418a3 (diff)
downloadcryptopp-git-acf15c21c0a3f43c24502766209627edae9d4ea0.tar.gz
Update comments
Diffstat (limited to 'test.cpp')
-rw-r--r--test.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/test.cpp b/test.cpp
index dbde50c2..dc442713 100644
--- a/test.cpp
+++ b/test.cpp
@@ -152,8 +152,9 @@ int CRYPTOPP_API main(int argc, char *argv[])
std::string seed = IntToString(time(NULL));
seed.resize(16, ' ');
- OFB_Mode<AES>::Encryption& prng = dynamic_cast<OFB_Mode<AES>::Encryption&>(GlobalRNG());
- prng.SetKeyWithIV((byte *)seed.data(), 16, (byte *)seed.data());
+ // Fetch the SymmetricCipher interface, not the RandomNumberGenerator interface, to key the underlying cipher
+ OFB_Mode<AES>::Encryption& aesg = dynamic_cast<OFB_Mode<AES>::Encryption&>(GlobalRNG());
+ aesg.SetKeyWithIV((byte *)seed.data(), 16, (byte *)seed.data());
std::string command, executableName, macFilename;