(time, stk, type, url)
| 1631 | }) |
| 1632 | } |
| 1633 | function decrypt(time, stk, type, url) { |
| 1634 | stk = stk || (url ? getUrlData(url, '_stk') : '') |
| 1635 | if (stk) { |
| 1636 | const timestamp = new Date(time).Format("yyyyMMddhhmmssSSS"); |
| 1637 | let hash1 = ''; |
| 1638 | if ($.fingerprint && $.token && $.enCryptMethodJD) { |
| 1639 | hash1 = $.enCryptMethodJD($.token, $.fingerprint.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString($.CryptoJS.enc.Hex); |
| 1640 | } else { |
| 1641 | const random = '5gkjB6SpmC9s'; |
| 1642 | $.token = `tk01wcdf61cb3a8nYUtHcmhSUFFCfddDPRvKvYaMjHkxo6Aj7dhzO+GXGFa9nPXfcgT+mULoF1b1YIS1ghvSlbwhE0Xc`; |
| 1643 | $.fingerprint = 5287160221454703; |
| 1644 | const str = `${$.token}${$.fingerprint}${timestamp}${$.appId}${random}`; |
| 1645 | hash1 = $.CryptoJS.SHA512(str, $.token).toString($.CryptoJS.enc.Hex); |
| 1646 | } |
| 1647 | let st = ''; |
| 1648 | stk.split(',').map((item, index) => { |
| 1649 | st += `${item}:${getUrlData(url, item)}${index === stk.split(',').length -1 ? '' : '&'}`; |
| 1650 | }) |
| 1651 | const hash2 = $.CryptoJS.HmacSHA256(st, hash1.toString()).toString($.CryptoJS.enc.Hex); |
| 1652 | // console.log(`\nst:${st}`) |
| 1653 | // console.log(`h5st:${["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2)].join(";")}\n`) |
| 1654 | return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2)].join(";")) |
| 1655 | } else { |
| 1656 | return '20210318144213808;8277529360925161;10001;tk01w952a1b73a8nU0luMGtBanZTHCgj0KFVwDa4n5pJ95T/5bxO/m54p4MtgVEwKNev1u/BUjrpWAUMZPW0Kz2RWP8v;86054c036fe3bf0991bd9a9da1a8d44dd130c6508602215e50bb1e385326779d' |
| 1657 | } |
| 1658 | } |
| 1659 | |
| 1660 | /** |
| 1661 | * 获取url参数值 |
no test coverage detected