class SSHKey

def encrypted_private_key

If no passphrase is set, returns the unencrypted private key

Fetch the encrypted RSA/DSA private key using the passphrase provided
def encrypted_private_key
  return private_key unless passphrase
  key_object.to_pem(OpenSSL::Cipher.new("AES-128-CBC"), passphrase)
end