1) How can I re-use a StringSource object created for a pipeline? 2) Is it possible to hold back on the generation of the hash so I can add more information to be hashed? Or I should concatenate my input message before hand?
#include <iostream> #include "cryptopp/keccak.h" #include "cryptopp/hex.h" int main(int argc, char* argv[]) { try { // Hash with sha3 and a non-standard digest CryptoPP::Keccak hash = CryptoPP::Keccak(16); std::string message = " A message "; std::cout<<"Input message: " << message << std::endl; std::string output; // Pipeline CryptoPP::StringSource ss1(message, true, new CryptoPP::HashFilter( hash , new CryptoPP::HexEncoder( new CryptoPP::StringSink( output )))); std::cout<<"Output message: " << output << std::endl; } catch(const CryptoPP::Exception& ex) { std::cerr <<ex.what() <<std::endl; } return 0; } Can I create this ss1 object and reuse multiple times? Thank you in advance! Nico -- -- You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to cryptopp-users-unsubscr...@googlegroups.com. More information about Crypto++ and this group is available at http://www.cryptopp.com. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.