MCPcopy Create free account
hub / github.com/Tencent/CodeAnalysis / get_data_sha256

Method get_data_sha256

server/projects/main/util/fileserver.py:61–66  ·  view source on GitHub ↗

获取指定数据的sha256

(cls, data)

Source from the content-addressed store, hash-verified

59
60 @classmethod
61 def get_data_sha256(cls, data):
62 """获取指定数据的sha256
63 """
64 sha256_val = hashlib.sha256()
65 sha256_val.update(data.encode("utf-8"))
66 return sha256_val.hexdigest()
67
68 def get_auth_headers(self):
69 """获取头部信息

Callers 1

put_fileMethod · 0.95

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected