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

Function aesgcm_encrypt_stream

Scripts/ButSystem.py:441–462  ·  view source on GitHub ↗

File format: MAGIC || NONCE || TAG || CIPHERTEXT

(src_fp, dst_path: str)

Source from the content-addressed store, hash-verified

439 with _TERMUX_ERROR_LOCK:
440 if _TERMUX_ERROR_MONITOR_ACTIVE:
441 sys.stderr.write("\n[ButSystem ERROR] " + rendered + "\n")
442 sys.stderr.flush()
443 else:
444 _TERMUX_ERROR_BUFFER.append(rendered)
445 del _TERMUX_ERROR_BUFFER[:-50]
446 except Exception:
447 pass
448
449
450_TERMUX_ERROR_HANDLER = _TermuxErrorBufferHandler()
451logging.getLogger().addHandler(_TERMUX_ERROR_HANDLER)
452
453
454def _activate_termux_error_monitor():
455 """Print buffered errors and stream new errors below the generated links."""
456 global _TERMUX_ERROR_MONITOR_ACTIVE
457 with _TERMUX_ERROR_LOCK:
458 _TERMUX_ERROR_MONITOR_ACTIVE = True
459 buffered = list(_TERMUX_ERROR_BUFFER)
460 _TERMUX_ERROR_BUFFER.clear()
461 print("ERROR MONITOR: New application errors will appear below this line.")
462 if buffered:
463 print(f"STARTUP ERRORS FOUND: {len(buffered)}")
464 for item in buffered:
465 print("\n[ButSystem ERROR] " + item)

Callers 2

workerFunction · 0.70
profiler_combineFunction · 0.70

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected