MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / aesgcm_encrypt_text

Function aesgcm_encrypt_text

Scripts/ButSystem.py:604–622  ·  view source on GitHub ↗

aesgcm_encrypt_text. Internal helper function. This docstring was added automatically to improve maintainability. Args: plaintext: Parameter. Returns: Varies.

(plaintext: str)

Source from the content-addressed store, hash-verified

602def _bg_encrypt_file(tmp_plain: str, out_enc: str, finalize_fn):
603 """Encrypt tmp_plain -> out_enc in a background thread, then call finalize_fn(success:bool, err:str|None)."""
604 def worker():
605 """worker.
606
607Route handler or application helper.
608
609This docstring was expanded to make future maintenance easier.
610
611Returns:
612 Varies.
613"""
614 err = None
615 ok = False
616 try:
617 with open(tmp_plain, "rb") as fp:
618 aesgcm_encrypt_stream(fp, out_enc)
619 ok = True
620 except Exception as e:
621 err = str(e)
622 finally:
623 try:
624 if os.path.exists(tmp_plain):
625 os.remove(tmp_plain)

Callers 15

set_profileFunction · 0.70
dm_sendFunction · 0.70
api_dm_editFunction · 0.70
api_dm_deleteFunction · 0.70
group_sendFunction · 0.70
profiler_combineFunction · 0.70
profiler_createFunction · 0.70
profiler_updateFunction · 0.70
_report_store_attachmentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected