Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Tencent/CodeAnalysis
/ get_data_md5
Method
get_data_md5
server/projects/main/util/fileserver.py:53–58 ·
view source on GitHub ↗
获取指定数据的md5
(cls, data)
Source
from the content-addressed store, hash-verified
51
52
@classmethod
53
def
get_data_md5(cls, data):
54
""
"获取指定数据的md5
55
""
"
56
md5_val = hashlib.md5()
57
md5_val.update(data.encode(
"utf-8"
))
58
return
md5_val.hexdigest()
59
60
@classmethod
61
def
get_data_sha256(cls, data):
Callers
1
put_file
Method · 0.95
Calls
1
update
Method · 0.45
Tested by
no test coverage detected