Creates an ARC2 context initialized with the given parameters, with the ability to override the mode in the parameters, and key that can later be used for encryption and/or decryption.
#include "huarc2.h"
int hu_ARC2BeginV2(sb_Params arc2Params, sb_Key arc2Key, int mode, size_t ivLen, const unsigned char *iv, sb_Context *arc2Context, sb_GlobalCtx sbCtx)
BlackBerry 10.0.0
An ARC2 parameters object.
An ARC2 key object.
The mode of operation. The acceptable values are SB_ARC2_ECB, SB_ARC2_CBC, SB_ARC2_CFB64 and SB_ARC2_OFB64. Specifying 0 will use the mode from the parameters object.
The length (in bytes) of the initial vector. The only acceptable value is SB_ARC2_IV_SIZE.
The initial vector.
The ARC2 context object pointer.
A global context.
An initial vector, iv, is required for the SB_ARC2_CBC, SB_ARC2_CFB64 and SB_ARC2_OFB64 modes of operation. iv is ignored for SB_ARC2_ECB, as an initial vector is not required for that mode.
The arc2Params parameters object is NULL.
The tag for the params object is not of the expected type.
The arc2Key key object is NULL.
The arc2Key key object is invalid.
The initial vector, iv, is NULL.
ivLen is an invalid initial vector length.
The arc2Context context object pointer is NULL.
No mode has been specified.
Memory allocation failure.
Success.