CRYPTO_RSA_Encrypt

Syntax


#include <nitro/crypto.h>

s32 CRYPTO_RSA_Encrypt(CRYPTORSAContext *context, CRYPTORSAEncryptParam *param);
		

Arguments

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.

Return Values

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.

Description

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.

See Also

CRYPTO_RSA_EncryptInit, CRYPTO_RSA_EncryptTerminate

Revision History

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