hu_ARC4Begin()

Creates an ARC4 context initialized with the given parameters and key that can later be used for encryption and/or decryption.

Synopsis:

#include "huarc4.h"
 
int hu_ARC4Begin(sb_Params arc4Params, sb_Key arc4Key, sb_Context *arc4Context, sb_GlobalCtx sbCtx)

Since:

BlackBerry 10.0.0

Arguments:

arc4Params

An ARC4 parameters object.

arc4Key

An ARC4 key object.

arc4Context

The ARC4 context object pointer.

sbCtx

A global context.

Library:

libhuapi (For the qcc command, use the -l huapi option to link against this library)

Description:

Returns:

SB_ERR_NULL_PARAMS

The arc4Params parameters object is NULL.

SB_ERR_BAD_PARAMS

The tag for the params object is not of the expected type.

SB_ERR_NULL_KEY

arc4Key is NULL.

SB_ERR_BAD_KEY

arc4Key is invalid.

SB_ERR_NULL_CONTEXT_PTR

The sbCtx object pointer is NULL.

SB_FAIL_ALLOC

Memory allocation failure.

SB_SUCCESS

Success.