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

Developer

API Reference

IBNENG_GETOPERATIONCONTEXT()

Brew Release
Brew MP 1.0.2
See Also
Description
This method returns an IBN object that functions both to represent a stored big number and a context with which to perform arithmetic operations.
Params
pif
[in]:
Pointer to IBNEng interface object
piBN
[in]:
Optional BN object that contains initialization data or NULL.
piOutBN
[out]:
Pointer to a newly created IBN operation context.
Interface
Prototype
  •    int IBNEng_GetOperationContext(
             IBNEng *pif,
             const IBN *piBN,
             IBN **piOutBN)
    
Return
  • AEE_SUCCESS: piOutBN AEE_ENOMEMORY: Out of memory AEE_CRYPT_INVALID_KEY: key is wrong length or otherwise invalid.
    Other error codes returned by specific engine implementation.
Side Effect
  • None
Comments
If piBN is provided (it is not NULL), it is used to initialize the value in the context returned. The value for the new context is obtained by calling IBN_Get(piBN). If piBN is NULL, then an uninitialized IBN is returned. The operation context exports the IBN interface but some implementations might not implement all of the IBN functionality.