def METHOD_NAME(credential):
    """Build a dictionary containing cred information."""
    ansible_dict = {}
    username = credential.get("username")
    password = credential.get("password")
    ssh_keyfile = credential.get("ssh_keyfile")
    ssh_key = credential.get("ssh_key")
    become_method = credential.get("become_method")
    become_user = credential.get("become_user")
    become_password = credential.get("become_password")
    ansible_dict["ansible_user"] = username
    if password:
        ansible_dict["ansible_ssh_pass"] = decrypt_data_as_unicode(password)
    if ssh_keyfile:
        ansible_dict["ansible_ssh_private_key_file"] = ssh_keyfile
    if ssh_key:
        ansible_dict["ansible_ssh_private_key_file"] = generate_ssh_keyfile(
            credential, decrypt_data_as_unicode(ssh_key)
        )
    if become_password:
        ansible_dict["ansible_become_pass"] = decrypt_data_as_unicode(become_password)
    if become_method:
        ansible_dict["ansible_become_method"] = become_method
    if become_user:
        ansible_dict["ansible_become_user"] = become_user
    return ansible_dict