Thanks for the information Jeffrey,

I am having difficulty with the verification, though. Having created
the digest using HashFilter(), I attempted to use
HashVerificationFilter() to verify the generated digest. The code is
below. The output I get from the verification process is "00", which I
guess is "Verification Failed" in Hexadecimal.

Is the digest (i.e sOut in my case) supposed to be the only input to
HashVerificationFilter()? Has anybody been able to successfully verify
a digest?

member_ptr<MessageAuthenticationCode> mac;
std::string decodedKey;
StringSource(hexKey, true, new HexDecoder(new
StringSink(decodedKey)));
mac.reset(new HMAC<SHA1>((const byte *)decodedKey.data(),
decodedKey.size()));

string str("This is a test"); string sOut,sOut2;
StringSource(str, true, new HashFilter(*mac, new HexEncoder(new
StringSink(sOut))));
StringSource(sOut, true, new HashVerificationFilter(*mac, new
HexEncoder(new StringSink(sOut2))));


Thanks!!

On Oct 19, 8:58 am, Jeffrey Walton <[email protected]> wrote:
> > However, I couldn't find a suitable function for verifying
> > the created digest.
>
> http://www.cryptopp.com/docs/ref/class_hash_verification_filter.html
>
> Cruising the annotated reference shows nearly all Crypto++ object
> (except for some typedefs, such as 
> SecByteBlock).http://www.cryptopp.com/docs/ref/annotated.html
>
> On Oct 18, 3:57 pm, nuges01 <[email protected]> wrote:
>
> > Hi,
>
> > I'm want to use the function HmacFile(...) to create a digest.
> > However, I couldn't find a suitable function for verifying the created
> > digest. Does anyone know how this is done in Cryptopp??
>
> > Kind regards,

-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.

Reply via email to