hu_RSANSizeGet()

Get size of n (in bits) by giving p and q:

Synopsis:

#include "hursa.h"
 
int hu_RSANSizeGet(const size_t pLen, const unsigned char *p, const size_t qLen, const unsigned char *q, size_t *modulusBits, sb_GlobalCtx sbCtx)

Since:

BlackBerry 10.0.0

Arguments:

pLen

Byte length of the first large prime.

p

First large prime.

qLen

Byte length of the second large prime.

q

Second large prime.

modulusBits

Bit length of the modulus.

sbCtx

Memory callback data.

Library:

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

Description:

Returns:

SB_ERR_BAD_INPUT_BUF_LEN

pLen or qLen is zero.

SB_ERR_NULL_INPUT_BUF

p or q is NULL.

SB_ERR_BAD_INPUT

p or q is zero.

SB_FAIL_ALLOC

Memory allocation failure.

SB_SUCCESS

Success.