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

Method get_data_md5

server/projects/analysis/util/fileserver.py:57–63  ·  view source on GitHub ↗

获取指定数据的md5

(cls, data)

Source from the content-addressed store, hash-verified

55
56 @classmethod
57 def get_data_md5(cls, data):
58 """获取指定数据的md5
59 """
60 md5_val = hashlib.md5()
61 tempdata = data if type(data) == bytes else data.encode("utf-8")
62 md5_val.update(tempdata)
63 return md5_val.hexdigest()
64
65 @classmethod
66 def get_data_sha256(cls, data):

Callers 1

put_fileMethod · 0.95

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected