Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
6615 Discussions

ippsHMACSHA1MessageDigest fails with ippStsLengthErr

Ronen_C_
Beginner
153 Views

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
153 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
153 Views

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

Igor_A_Intel
Employee
153 Views

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

regards, Igor

Reply