hu_MD2Msg()

Generates the MD2 message digest for the given data.

Synopsis:

#include "humd2.h"
 
int hu_MD2Msg(size_t digestLen, sb_YieldCtx yieldCtx, size_t messageLen, const unsigned char *messageData, unsigned char *digest, sb_GlobalCtx sbCtx)

Since:

BlackBerry 10.0.0

Arguments:

digestLen

The length (in bytes) of an MD2 digest. The only acceptable value is SB_MD2_DIGEST_LEN.

yieldCtx

Ignored.

messageLen

The length (in bytes) of the data.

messageData

Data buffer.

digest

Message digest buffer. The length (in bytes) of the buffer must be at least SB_MD2_DIGEST_LEN.

sbCtx

A global context.

Library:

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

Description:

Yielding is not supported for message digest operations.

This function should only be called for data that can be stored entirely in memory.

Returns:

SB_ERR_BAD_DIGEST_LEN

digestLen is an invalid digest length.

SB_ERR_NULL_INPUT_BUF

messageData is NULL.

SB_ERR_NULL_OUTPUT_BUF

digest is NULL.

SB_SUCCESS

Success.

Last modified: 2014-05-14



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

comments powered by Disqus