Produces an output block by applying the basic RSA primitive on an input block using a public key.
#include "hursa.h"
int hu_RSAPublicEncrypt(sb_Params rsaParams, sb_PublicKey publicKey, const unsigned char *input, unsigned char *output, sb_GlobalCtx sbCtx)
BlackBerry 10.0.0
An RSA parameters object.
An RSA public key object.
The input buffer. This must be equal to the modulus length.
The output buffer. This must be equal to the modulus length.
A global context.
The mathematical operation performed is raising the input value to the public exponent modulo the modulus.
The input value, treated as the octet string encoding of an integer, must be numerically smaller than the modulus.
The input and output buffers may point to the same address.
The length of the modulus can be determined by calling hu_RSAKeyGet() and retrieving the nLen argument.
The rsaParams object is NULL.
The tag for the params object is not of the expected type.
The publicKey object is NULL.
The publicKey object is invalid.
The input buffer is NULL.
The output buffer is NULL.
Memory allocation failure.
Success.