Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

ippsHMACSHA1MessageDigest fails with ippStsLengthErr

Ronen_C_
Beginner
319 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
319 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

0 Kudos
Ronen_C_
Beginner
319 Views

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

0 Kudos
Igor_A_Intel
Employee
319 Views

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

regards, Igor

0 Kudos
Reply