- Get the size required to configure the contextIppsSMS4Specby calling the functionSMS4GetSize.
- Call an operating system memory allocation service function to allocate a buffer of size not less than the one specified by the functionSMS4GetSize.
- Initialize the pointer to the context by calling the functionSMS4Init.
- Specify the initialization vector and then call the functionSMS4EncryptCBCto encrypt the input data stream under CBC mode using SMS4 scheme.
- Clean up secret data stored in the context.
- Free the memory allocated to the buffer once SMS4 encryption under the CBC mode has been completed.