Creates an ARC2 parameters object.
#include "huarc2.h"
int hu_ARC2ParamsCreate(int mode, size_t effectiveKeyBits, sb_RNGCtx rngContext, sb_YieldCtx yieldCtx, sb_Params *arc2Params, sb_GlobalCtx sbCtx)
BlackBerry 10.0.0
The mode of operation. The acceptable values are SB_ARC2_ECB, SB_ARC2_CBC, SB_ARC2_CFB64 or SB_ARC2_OFB64. 0 is also acceptable since some adapters support hu_ARC2BeginV2().
The length (in bits) of the effective key strength. The maximum allowable length is SB_ARC2_MAX_EFFECTIVE_KEY_BITS.
An RNG context. (Optional - set to NULL if key generation will not be performed.)
The yield context. (Optional - set to NULL if yielding is not required.)
The ARC2 parameters object pointer.
A global context.
The mode of operation and effective key length must be specified. An RNG context and/or yielding context must be supplied if key generation and/or yielding will be performed, respectively.
The mode of operation is invalid.
effectiveKeyBits is an invalid effective key strength.
The arc2Params parameters object pointer is NULL.
Memory allocation failure.
Success.