The crypto ++ FileSource class takes std::istream& in the constructor, so it seems like you're done.
FileSource (std::istream &in, bool pumpAll, BufferedTransformation *attachment=NULL)
EDIT
if you ask how to use a hash function on istream in cryptopp , here is a sample taken from the cryptopp wiki modified by me for use with istream :
#include "sha.h" #include "files.h" std::string digest; CryptoPP::SHA256 hash; CryptoPP::FileSource(in, true,
This will read the in stream to eof, pass it through the hash filter, and finally, the result will be included in the digest line.
davka
source share