MCPcopy Create free account
hub / github.com/Rfym21/Qwen2API / sha256Encrypt

Function sha256Encrypt

src/utils/tools.js:19–27  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

17}
18
19const sha256Encrypt = (text) => {
20 if (typeof text !== 'string') {
21 logger.error('输入必须是字符串类型', 'TOOLS')
22 throw new Error('输入必须是字符串类型')
23 }
24 const hash = crypto.createHash('sha256')
25 hash.update(text, 'utf-8')
26 return hash.digest('hex')
27}
28
29const JwtDecode = (token) => {
30 try {

Callers 2

loginMethod · 0.85

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected