rsa_key_encrypt


Description:


public ByteArray rsa_key_encrypt (ByteArray data, string? in_password, out string out_password) throws Error

Encrypts the given RSA private key data with the given password (or generates a password if no password was given) and converts the data to PEM format suitable for writing to a file.

It uses Triple DES cipher for the encryption.

Parameters:

data

RSA private key data to be encrypted

in_password

existing password to use, if any

out_password

if in_password was null, a random password will be generated and returned in this argument

Returns:

on success, PEM-formatted data suitable for writing to a PEM-formatted certificate/private key file.


Namespace: NM.Utils
Package: libnm-util