def save(self, filename):
aead_f = open(filename, "<STR_LIT:wb>")<EOL>fmt = "<STR_LIT>" % (pyhsm.defines.YSM_AEAD_NONCE_SIZE, len(self.data))<EOL>version = <NUM_LIT:1><EOL>packed = struct.pack(fmt, version, self.key_handle, self.nonce, self.data)<EOL>aead_f.write(YHSM_AEAD_File_Marker + packed)<EOL>aead_f.close()<EOL>
Store AEAD in a file.

@param filename: File to create/overwrite
@type filename: string