def store_in_internal_db(args, hsm, modhex_id, public_id, kh, aead):
if args.verbose:<EOL><INDENT>print("<STR_LIT>" %(len(aead.data), shorten_aead(aead)), end='<STR_LIT:U+0020>')<EOL><DEDENT>try:<EOL><INDENT>hsm.db_store_yubikey(public_id.decode('<STR_LIT>'), kh, aead)<EOL>if args.verbose:<EOL><INDENT>print("<STR_LIT:OK>")<EOL><DEDENT><DEDENT>except pyhsm.exception.YHSM_CommandFailed as e:<EOL><INDENT>if args.verbose:<EOL><INDENT>print("<STR_LIT:%s>" % (pyhsm.defines.status2str(e.status)))<EOL><DEDENT>else:<EOL><INDENT>print("<STR_LIT>" % (modhex_id, pyhsm.defines.status2str(e.status)))<EOL><DEDENT>return False<EOL><DEDENT>return True<EOL>
Store record (AEAD) in YubiHSM internal DB