MCPcopy Index your code
hub / github.com/1Panel-dev/MaxKB / get_sha256_hash

Function get_sha256_hash

apps/common/utils/common.py:340–346  ·  view source on GitHub ↗
(_v: str | bytes)

Source from the content-addressed store, hash-verified

338
339
340def get_sha256_hash(_v: str | bytes):
341 sha256 = hashlib.sha256()
342 if isinstance(_v, str):
343 sha256.update(_v.encode())
344 else:
345 sha256.update(_v)
346 return sha256.hexdigest()
347
348
349ALLOWED_CLASSES = {

Callers 1

saveMethod · 0.90

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected