So far my code looks like this... VMAC<AES, 128> myMac; myMac.UncheckedSetKey(userKey, MY_KEY_LENGTH, g_nullNameValuePairs); myMac.Update(myData, myDataSize); myMac.Final(myHashValue);
I believe I need to do much more to initialize the VMAC class because I am getting the following failure messages when I run the exe: CryptoPP::Exception caught: VMAC(AES)-128: this object requires an IV I have tried to replace the g_nullNameValuePairs with a flushed out object, but it is unclear to me how I set up (initialize) the necessary NameValuePairs object. I can't find any doc on this. Does anyone have a good example of this that they are willing to share? Also, what exactly is an IV? Bill On Tuesday, September 18, 2012 4:32:56 PM UTC-4, Bill Santo wrote: > > Please forgive my basic question, and please redirect me to a different > resource if appropriate. > > I want to use the cryptopp library to generate a 128 bit hash value using > the vhash algorithm. I've been studying the vmac and iterhash class > interfaces and code. I think I must invoke Update(...) specifying the input > data block and its size. The final hash value can then be retrieved using > TruncatedFinal(...). Or, if the data is in one contiguous block, I can call > CalculatedDigest() instead. Is this correct? > > Is there other setup or initialization of the vhash or other cryptopp code > that is required prior to these calls? > > I've seen the SHA example in the User's Guide ( > http://www.cryptopp.com/wiki/Hash ) which implies that these are the only > method calls needed. > > Thanks to anyone who can point me in the right direction. I want to be > sure I am generating correct hash values. > > Bill > > -- 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.
