Creates an DES context initialized with the given parameters, with the ability to override the mode in the parameters, and a key that can later be used for encryption and/or decryption.
#include "hudes.h"
int hu_DESBeginV2(sb_Params desParams, sb_Key desKey, int mode, size_t ivLen, const unsigned char *iv, sb_Context *desContext, sb_GlobalCtx sbCtx)
BlackBerry 10.0.0
A DES parameters object.
A DES key object.
The mode of operation. The acceptable values are SB_DES_ECB, SB_DES_CBC, SB_DES_CFB64 and SB_DES_OFB64. Specifying 0 will use the mode from the parameters object.
The length (in bytes) of initial vector. The only acceptable value is SB_DES_IV_SIZE.
The initial vector.
The DES context object pointer.
A global context.
An initial vector, iv, is required for the SB_DES_CBC, SB_DES_CFB64 and SB_DES_OFB64 modes of operation. iv is ignored for SB_DES_ECB, as an initial vector is not required for that mode.
The desParams object is NULL.
The tag for the params object is not of the expected type.
The desKey key object is NULL.
The desKey key object is invalid.
The initial vector, iv, is NULL.
The initial vector length, ivLen, is invalid.
The sbCtx object pointer is NULL.
No mode has been specified.
Memory allocation failure.
Success.