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::Encryption& prng = dynamic_cast::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::Encryption& aesg = dynamic_cast::Encryption&>(GlobalRNG()); + aesg.SetKeyWithIV((byte *)seed.data(), 16, (byte *)seed.data()); std::string command, executableName, macFilename;