Cryptography for Intel(R) Integrated Performance Primitives Developer Reference

ID 768738
Date 12/16/2022
Document Table of Contents

HashPack, HashUnpack

Packs/unpacks the IppsHashState or IppsHashState_rmf context into/from a user-defined buffer.


IppStatus ippsHashPack (const IppsHashState* pCtx, Ipp8u* pBuffer, int bufSize);

IppStatus ippsHashPack_rmf(const IppsHashState_rmf* pCtx, Ipp8u* pBuffer, int bufferSize);

IppStatus ippsHashUnpack (const Ipp8u* pBuffer, IppsHashState* pCtx);

IppStatus ippsHashUnpack_rmf(const Ipp8u* pBuffer, IppsHashState_rmf* pCtx);

Include Files




Pointer to the IppsHashState or IppsHashState_rmf context.


Pointer to the user-defined buffer.

bufSize, bufferSize

The size of the user-defined buffer in bytes.

The HashPack function transforms the *pCtx context to a position-independent form and stores it in the the *pBuffer buffer. The HashUnpack function performs the inverse operation, that is, transforms the contents of the *pBuffer buffer into a normal IppsHashState or IppsHashState_rmf context. The HashPack and HashUnpack functions enable replacing the position-dependent IppsHashState or IppsHashState_rmf context in the memory.

The value of the bufSize parameter must be not less than the size of IppsHashState or IppsHashState_rmf context. Call the HashGetSize function prior to HashPack to determine the size of the buffer.


This function has a reduced memory footprint version. To learn more, see Reduced Memory Footprint Functions.

Return Values


Indicates no error. Any other value indicates an error or warning.


Indicates an error condition if any of the specified pointers is NULL.


Indicates an error condition if the value of bufSize is less than the size of the IppsHashState context.


Indicates an error condition in a ippsHashPack_rmf call if the context parameter does not match the operation.


Indicates an error condition if the value of bufferSize is less than the size of the IppsHashState_rmf context.

Did you find the information on this page useful?

Characters remaining:

Feedback Message