def encrypt(data)
      raise NoPublicKeyError, "Public key file: #{public_key_file}" unless public?
      
      encrypted_data = public_rsa.public_encrypt(data)
      [encrypted_data].pack('m')
    end
def encrypt(data)
      raise NoPublicKeyError, "Public key file: #{public_key_file}" unless public?
      
      encrypted_data = public_rsa.public_encrypt(data)
      [encrypted_data].pack('m')
    end
Creates a new cipher that uses an asymmetric encryption strategy.

 Configuration options:
 * <tt>:private_key_file</tt> - Encrypted private key file
 * <tt>:public_key_file</tt> - Public key file
 * <tt>:password</tt> - The password to use in the symmetric cipher
 * <tt>:algorithm</tt> - Algorithm to use symmetrically encrypted strings
 Encrypts the given data. If no public key file has been specified, then
 a NoPublicKeyError will be raised.