<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def encryption_details(self):
 """Return as a 3-tuple, this PREMIS encryption event's program, version, and key used to perform the encryption. """

        event_type = self.findtext("event_type")
        if event_type != "encryption":
            raise AttributeError(
                'PREMIS events of type "{}" have no encryption'
                " details".format(event_type)
            )
        parsed_encryption_event_detail = self.parsed_event_detail
        encryption_program = _get_event_detail_attr(
            "program", parsed_encryption_event_detail
        )
        encryption_program_version = _get_event_detail_attr(
            "version", parsed_encryption_event_detail
        )
        encryption_key = _get_event_detail_attr("key", parsed_encryption_event_detail)
        return encryption_program, encryption_program_version, encryption_key