- ciphertext = pki:encrypt(plaintext)
- plaintext = pki:decrypt(ciphertext)
SYNOPSIS
DESCRIPTION
Run some data through asymetric encryption/decryption.
The functions require that a key has previously been stored inside the object.
Since asymetric encryption tends to be slow, typically this is only used to encrypt/decrypt a key that is further on used to run symetric encryption, like AES.
RETURN VALUE
On success, returns the encrypted/decrypted data.
In case of an error both functions return three values: nil, a string describing the error and a negative error code from the underlying mbed TLS implementation.