mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-20 22:51:23 +08:00
fix lint
This commit is contained in:
+5
-1
@@ -152,7 +152,11 @@ const decrypt = (cipher) => {
|
||||
|
||||
const aesEcbEncrypt = (key, plaintext) => {
|
||||
// 某些运行时不允许使用 null 作为 IV,因此使用 Buffer.alloc(0) ,同时与上下文deriveX25519AesKey等函数保持一致
|
||||
const cipher = crypto.createCipheriv(`aes-${key.length * 8}-ecb`, key, Buffer.alloc(0))
|
||||
const cipher = crypto.createCipheriv(
|
||||
`aes-${key.length * 8}-ecb`,
|
||||
key,
|
||||
Buffer.alloc(0),
|
||||
)
|
||||
return Buffer.concat([cipher.update(Buffer.from(plaintext)), cipher.final()])
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -441,7 +441,7 @@ const createRequest = async (uri, data, options) => {
|
||||
) {
|
||||
NMTID_RETRIES_LEFT--
|
||||
answer.cookie = (
|
||||
typeof res.headers['set-cookie'] === 'string' // node 20 版本以前,可能解析为String
|
||||
typeof res.headers['set-cookie'] === 'string'
|
||||
? [res.headers['set-cookie']]
|
||||
: res.headers['set-cookie'] || []
|
||||
).map((x) => {
|
||||
|
||||
Reference in New Issue
Block a user