hu_SHA1CtxDuplicate()

Duplicates a SHA-1 context.

Synopsis:

#include "husha1.h"
 
int hu_SHA1CtxDuplicate(sb_Context hashContext, sb_Context *newHashContext, sb_GlobalCtx sbCtx)

Since:

BlackBerry 10.0.0

Arguments:

hashContext

The original SHA-1 context object.

newHashContext

The target SHA-1 context object pointer.

sbCtx

A global context.

Library:

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

Description:

This function can be used to compute the digest of multiple items of data with identical prefixes.

Returns:

SB_ERR_NULL_CONTEXT

hashContext, the original SHA-1 context object, is NULL.

SB_ERR_BAD_CONTEXT

hashContext, the original SHA-1 context object, is invalid.

SB_ERR_NULL_CONTEXT_PTR

newHashContext, the target SHA-1 context object pointer, is NULL.

SB_FAIL_ALLOC

Memory allocation failure.

SB_SUCCESS

Success.