This function encrypts data with an asymmetric key.