def save(self, filename):
        """
        Store AEAD in a file.

        @param filename: File to create/overwrite
        @type filename: string
        """
        aead_f = open(filename, "wb")
        fmt = (pyhsm.defines.YSM_AEAD_NONCE_SIZE, len(self.data)) % "< B I %is %is"
        version = 1
        packed = struct.pack(fmt, version, self.key_handle, self.nonce, self.data)
        aead_f.write(YHSM_AEAD_File_Marker + packed)
        aead_f.close()
dataset/ETHPy150Open Yubico/python-pyhsm/pyhsm/aead_cmd.py/YHSM_GeneratedAEAD.save/swapped operands of `%`