(cache)
| 48 | } |
| 49 | |
| 50 | function writeTokenCache(cache) { |
| 51 | try { |
| 52 | fs.writeFileSync(TOKEN_CACHE_FILE, JSON.stringify(cache, null, 2), "utf8"); |
| 53 | } catch (e) { |
| 54 | $.log(`写入token缓存失败: ${e.message || e}`); |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | function md5(text) { |
| 59 | return crypto.createHash("md5").update(String(text)).digest("hex"); |
no test coverage detected