Skip to content

rsa_public_encrypt()#


Encrypts data using the public key portion of an RSA keypair.

Syntax
rsa_public_encrypt( rsa, plaintext, encrypted var )

The rsa parameter must have been previously initialized using one of the rsa_load_publickey_xxx functions.

Returns#

Returns 1 on success, 0 on error.

Parameters#

Parameter Description
rsa The internal reference to the RSA public key used for encryption
plaintext The data to be encrypted
encrypted A variable which receives the encrypted ciphertext in raw binary format