Generates a shared secret that is the output of a DH key agreement.
#include "huidlc.h"
int hu_IDLCDHRawSharedGen(sb_Params idlcParams, sb_PrivateKey privateKey, sb_PublicKey remotePublicKey, size_t *secretLen, unsigned char *sharedSecret, sb_GlobalCtx sbCtx)
BlackBerry 10.0.0
An IDLC parameters object.
An IDLC private key object.
An IDLC public key object.
The length (in bytes) of the shared secret.
The shared secret buffer.
A global context.
If the length of the shared secret is known, a pointer to a buffer large enough to hold the shared secret should be passed in sharedSecret and its length in secretLen. This function will copy the shared secret into sharedSecret and set the actual length of the shared secret in secretLen.
If sharedSecret is NULL, this function will set the correct length of the shared secret in secretLen. If sharedSecret is not NULL but secretLen is too small, this function will return an error.
The length of the shared secret can also be determined by calling hu_IDLCParamsGet() and retrieving the pLength argument.
The idlcParams object is NULL.
The tag for the params object is not of the expected type.
The private key object is NULL.
The private key object is invalid.
The public key object is NULL.
The public key object is invalid.
The shared secret buffer length is NULL.
The length of the shared secret is invalid.
Memory allocation failure.
Success.