API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

IHASHCTX_INIT()

Brew Release
Brew MP 1.0.2
See Also
Error Codes IHashCtx
Description
This function should be called before hashing or to restart the hashing process. This is required if you need to hash new streams of data with the same context.
Params
po
[]:
pointer to the IHashCtx interface object.
pCTX
[]:
pointer to a hash context structure.
nCTXSize
[]:
the size of the hash context structure.
Interface
Prototype
  •    void IHashCtx_Init(IHashCtx* pif, void* pCTX, int nCTXSize);
    
Return
  • AEESEC_HASH_INVALID_CTX : if the context is too small. (See the Comments section.)
Side Effect
  • None
Comments
This must be called before any calls to IHashCtx_Update to initialize the user-allocated context. The context pointed to by pCTX must be equal or greater in size than the required size based on the implementation. If the context is too small the calls to IHashCtx_Init and IHashCtx_Update will fail silently while IHashCtx_SetKey and IHashCtx_Final will return the error code AEESEC_HASH_INVALID_CTX. Each implementation will document the required context size for its implementation.