MCPcopy
hub / github.com/smallfawn/QLScriptPublic / _generate_sign

Method _generate_sign

daily/sfsy.py:278–288  ·  view source on GitHub ↗

生成API签名

(self)

Source from the content-addressed store, hash-verified

276 }
277
278 def _generate_sign(self) -> Dict[str, str]:
279 """生成API签名"""
280 timestamp = str(int(round(time.time() * 1000)))
281 data = f'token={self.config.TOKEN}&timestamp={timestamp}&sysCode={self.config.SYS_CODE}'
282 signature = hashlib.md5(data.encode()).hexdigest()
283
284 return {
285 'sysCode': self.config.SYS_CODE,
286 'timestamp': timestamp,
287 'signature': signature
288 }
289
290 def request(
291 self,

Callers 1

requestMethod · 0.95

Calls 1

timeMethod · 0.45

Tested by

no test coverage detected