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

Developer

API Reference

ICIPHERWRAPPER_SETCIPHER()

Brew Release
Brew MP 1.0.2
See Also
Error Codes ICipherFactory
Description
Sets the cipher used by ICipherWrapper to the ICipher1 specified.
Params
pICipherWrapper
[]:
Pointer to ICipherWrapper interface object.
pCipher
[]:
Pointer to ICipher1 or IRawCipher interface object.
Interface
Prototype
  •    int ICipherWrapper_SetCipher(ICipherWrapper* pICipherWrapper, IQI* pCipher);
    
Return
  • AEE_SUCCESS: Cipher is successfully associated with the chaining mode AEE_ECLASSNOTSUPPORT: Class is not supported or is not a valid object.
Side Effect
  • None
Comments
The caller should release the cipher after calling this function to avoid memory leaks. ICipherWrapper_SetCipher performs its own IQUERYINTERFACE_AddRef(). The cipher key must be set after calling ICipherWrapper_SetCipher() in order for the object to be properly initialized.