MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / base64_encode

Function base64_encode

src/core/utils.py:544–549  ·  view source on GitHub ↗

Base64 编码

(data: Union[str, bytes])

Source from the content-addressed store, hash-verified

542
543
544def base64_encode(data: Union[str, bytes]) -> str:
545 """Base64 编码"""
546 if isinstance(data, str):
547 data = data.encode('utf-8')
548
549 return base64.b64encode(data).decode('utf-8')
550
551
552def base64_decode(data: str) -> str:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected