Added a check to see if using an RSA public key and avoid trying to decrypt if so