#include <nitro/crypto.h>
s32 CRYPTO_RSA_Encrypt(CRYPTORSAContext *context, CRYPTORSAEncryptParam *param);
context |
Specifies the address of the CRYPTORSAContext structure that was initialized by the CRYPTO_RSA_EncryptInit function. |
param |
Specifies the address of the structure for specifying strings and other data for RSA encryption. |
Returns one of the following process results.
Positive number |
Number of strings that were written to the output buffer (indicates that encryption succeeded). |
-1 |
Indicates that encryption failed. |
Performs encryption using the RSA algorithm.
The CRYPTO_RSA_EncryptInit function must be run before running cryptography operations with this function. In addition, the CRYPTO_RSA_EncryptTerminate function must be run when cryptography operations have completed.
The information required for encryption, such as the string to be encrypted and the output destination, must be specified in the members of the param argument. For details, refer to CRYPTORSAEncryptParam.
For detailed information on RSA encryption, see RSA Encryption Overview.
CRYPTO_RSA_EncryptInit, CRYPTO_RSA_EncryptTerminate
2008/04/02 Changed the return values (when successful, the function now returns the number of strings that were output).
2008/03/27 Initial version.
CONFIDENTIAL