Hello.I am using Cryptopp5.1 on MS Windows 2003.The compiler is MS VC.net 2003. I want to write a DSASignFile function just like RSASignFile.So I write this:
void DSASignFile(const char *privFilename, const char *messageFilename, const char *signatureFilename)
{
AutoSeededRandomPool rng;
FileSource privFile(privFilename, true, new HexDecoder);
DSA::Signer priv(privFile);

FileSource f(messageFilename, true, new SignerFilter(rng, priv, new HexEncoder(new FileSink(signatureFilename))));
}


But I always get a exception like "NullRNG: NullRNG should only be passed to functions that don't need to generate random bytes" when I use this function to sign a file.What is wrong?
Thank you very much!



Reply via email to