This function takes the private key source, generates a new public key
and returns its handle.
This function is useful when you do not have or lost your public key and want
to generate it from the private key.
Syntax
xp_rsa_generate_pub_key { key_src , public_key OUTPUT,
[ src_password ]}
Arguments
key_src
VARCHAR. This parameter can be a key handle, a file name or key body. If you
want to specify the file name, precede the file name with '<' char. For
example, if your key is stored in the file c:\privatekey.pem set this parameter to
'<c:\privatekey.pem'.
public_key
VARCHAR. On success this variables holds the newly created public key.
src_password
VARCHAR. This parameter is optional. It is a password which is used for reading
the
source key if you specify the filename or the key body in key_src.
Permissions
Execute permissions default to the public role.
Return Code Values
0 - success, or Error code
if failed. public_key IS NOT NULL (success) or IS NULL (failure)
Remarks
IF YOU LOOSE YOUR PRIVATE KEY THERE IS NO METHOD TO DECRYPT YOUR DATA
|