(value)
| 140 | } |
| 141 | |
| 142 | function decryptByAppKey(value) { |
| 143 | if (!value) return ""; |
| 144 | try { |
| 145 | const secret = getSignSecret(SIGN_APP_KEY); |
| 146 | const decipher = crypto.createDecipheriv("aes-256-cbc", Buffer.from(secret, "utf8"), Buffer.from(secret.slice(0, 16), "utf8")); |
| 147 | return Buffer.concat([decipher.update(String(value), "base64"), decipher.final()]).toString("utf8"); |
| 148 | } catch { |
| 149 | return value; |
| 150 | } |
| 151 | } |
| 152 | |
| 153 | function cleanPayload(data = {}) { |
| 154 | return Object.entries(data).reduce((obj, [key, val]) => { |
no test coverage detected