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

Developer

API Reference

ICIPHER1_SETPARAM()

Brew Release
Brew MP 1.0.2
See Also
CIPHER_PARAM_XXX Error Codes ICipher1 ICipher1_GetParam
Description
This function is inherited from IParameters. Sets information required by the Cipher. This method takes an ID that specifies what information is provided. The pParam contains the information. See CIPHER_PARAM_XXX for details on the supported parameters.
Params
pICipher
[]:
Pointer to ICipher1 interface object.
id
[]:
Type of parameter to set.
pParam
[]:
Pointer to a structure containing the value to set.
cParam
[]:
size of structure passed in.
Interface
Prototype
  •    int ICipher1_SetParam(ICipher1* pICipher, int id, void *pParam, unsigned *pcParam);
    
Return
  • AEE_SUCCESS: Parameter fetched successfully. AEE_EBADPARM: Invalid parameter - bad set type or pParam is null. AEE_CRYPT_INVALID_KEY: key is wrong length or otherwise invalid. AEE_EBADSTATE: ICipher1 has not been initialized properly (i.e. key not set).
Side Effect
  • None
Comments
Calling SetParam between calls to Process or ProcessLast will given undefined results and should never be done. SetParam should be called either on a freshly created ICipher1 or after ProcessLast has been called to fully drain the internel buffer. There are two exceptions allowed for calling SetParam between Process and ProcessLast. A given cipher may define some meaning for this call or a given parameter may define some meaning. However if the meaning is not defined in this way the results are entirely undefined.