Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Ronen_C_
Beginner
44 Views

ippsHMACSHA1MessageDigest fails with ippStsLengthErr

Hi,

I'm using the function ippsHMACSHA1MessageDigest(const Ipp8u *pSrcMesg, int mesgLen, const Ipp8u *pKey, int keyLen, Ipp8u *pMAC, int macLen) and it fails with ippStsLengthErr.

The parameters are : mesgLen = 176, keyLen = 20, macLen = 10.

What could be the reason for ippStsLengthErr?

Thanks for the help!

0 Kudos
3 Replies
Igor_A_Intel
Employee
44 Views

Hi Ronen,

according to the manual:

ippStsLengthErr - Indicates an error condition if msgLen is less than zero or macLen is less than one or greater than the length of the hash value.

regards, Igor

Ronen_C_
Beginner
44 Views

What is the length of the hash value? as i understood its the keyLen, no?

Igor_A_Intel
Employee
44 Views

HMAC SHA1 is always 160 bit - i.e. 20 bytes, so macLen must be == 20.

regards, Igor

Reply