hu_AuthEncDecrypt()

Decrypts and authenticates the provided ciphertext.

Synopsis:

#include "huauthenc.h"
 
int hu_AuthEncDecrypt(sb_Context authEncCtx, size_t ciphertextLen, const unsigned char *ciphertext, unsigned char *plaintext, sb_GlobalCtx sbCtx)

Since:

BlackBerry 10.0.0

Arguments:

authEncCtx

Authenticate encryption context object.

ciphertextLen

The length (in bytes) of ciphertext.

ciphertext

The ciphertext buffer.

plaintext

The plaintext buffer.

sbCtx

Global context.

Library:

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

Description:

The plaintext and ciphertext buffers must be the same length, and may overlap in memory subject to the constraints described in the API Reference section on overlapping buffers. This function can be called repeatedly to encrypt more plaintext.

Returns:

SB_ERR_BAD_CONTEXT

The authEncCtx is of the wrong type.

SB_ERR_BAD_LENGTH

The plaintextLen is invalid.

SB_ERR_NULL_INPUT_BUF

The ciphertext buffer is NULL.

SB_ERR_NULL_OUTPUT_BUF

The plaintext buffer is NULL.

Last modified: 2014-05-14



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus