|
Hi, all
I trace the source code, it seems after comparing,
the correct result is set to m_verified variable in VerifierFilter for both
case. But when I use GetLastResult() to read this variable, the memory of
variable is corrupt when using StringSource.
Does someone know what cause it?
Jessica
----- Original Message -----
From: Jessica Wei
Sent: Thursday, January 15, 2004 11:07 AM
Subject: Difference between verify a message file and message
string Hi, all
I tried to verify a signature that the plain text
is just a simple string "test data".
When I put the data into a file called
"message.txt", then using following code to verify the signature:
...
VerifierFilter* verifierFilter = new
VerifierFilter(pubVerifier);
verifierFilter->Put(sign, pubVerifier.SignatureLength()); FileSource f("message.txt", true, verifierFilter); bool retval =
verifierFilter->GetLastResult();
It gave me correct answer.
However, when I read the plain data from a
string, for example,
...
VerifierFilter* verifierFilter = new
VerifierFilter(pubVerifier);
verifierFilter->Put(sign, pubVerifier.SignatureLength()); StringSource ("test data", true, verifierFilter); return verifierFilter->GetLastResult(); It gave me incorrect answer.
I want to use second proach to verify a
signature. Could somebody know what's the problem?
Thanks for help.
Jessica
|
- More about Difference between verify a message file and messag... Jessica Wei
