Decrypt the ciphertext with a private key:
#include "hursa.h"
int hu_RSAKEMRawSecretDecrypt(sb_Params RSAParams, sb_PrivateKey privateKey, size_t ciphertextLen, const unsigned char *ciphertext, size_t *secretLen, unsigned char *secret, sb_GlobalCtx sbCtx)
BlackBerry 10.0.0
RSA parameters object.
Private key object.
The length (in bytes) of the ciphertext. This must be equal to the modulus length.
Ciphertext.
The length (in bytes) of the secret. On input, this must not less than the modulus length.
The buffer for the decryption result
Memory callback data.
If the secret buffer is set to NULL, its necessary length will be returned to secretLen.
If the length of the secret buffer is larger than necessary, this function will set secretLen to the right value upon return.
RSA parameters object is NULL.
RSA parameters object is invalid.
Private key object is NULL.
Private key object is invalid.
The secretLen is NULL.
The secretLen or ciphertextLen is shorter than necessary.
Memory allocation failure.
Success.