def store_oath_entry(args, nonce, aead, oath_c):
data = {"<STR_LIT:key>": args.uid,<EOL>"<STR_LIT>": aead.data.encode('<STR_LIT>'),<EOL>"<STR_LIT>": nonce.encode('<STR_LIT>'),<EOL>"<STR_LIT>": args.key_handle,<EOL>"<STR_LIT>": oath_c,<EOL>"<STR_LIT>": None,<EOL>}<EOL>entry = ValOathEntry(data)<EOL>db = ValOathDb(args.db_file)<EOL>try:<EOL><INDENT>if args.force:<EOL><INDENT>db.delete(entry)<EOL><DEDENT>db.add(entry)<EOL><DEDENT>except sqlite3.IntegrityError as e:<EOL><INDENT>sys.stderr.write("<STR_LIT>" % (e))<EOL>return False<EOL><DEDENT>return True<EOL>
Store the AEAD in the database.