kg通用签名函数
by @helloplhm-qwq
This commit is contained in:
parent
37ad2f522a
commit
e096f89108
@ -1,4 +1,5 @@
|
||||
import { inflate } from 'zlib'
|
||||
import { toMD5 } from '../utils'
|
||||
|
||||
// https://github.com/lyswhut/lx-music-desktop/issues/296#issuecomment-683285784
|
||||
const enc_key = Buffer.from([0x40, 0x47, 0x61, 0x77, 0x5e, 0x32, 0x74, 0x47, 0x51, 0x36, 0x31, 0x2d, 0xce, 0xd2, 0x6e, 0x69], 'binary')
|
||||
@ -14,6 +15,14 @@ export const decodeLyric = str => new Promise((resolve, reject) => {
|
||||
})
|
||||
})
|
||||
|
||||
// 通用签名函数
|
||||
export const signature = (params) => {
|
||||
let param_list = params.split('&')
|
||||
param_list.sort()
|
||||
let sign_params = `OIlwieks28dk2k092lksi2UIkp${param_list.join('')}OIlwieks28dk2k092lksi2UIkp`
|
||||
return toMD5(sign_params)
|
||||
}
|
||||
|
||||
// s.content[0].lyricContent.forEach(([str]) => {
|
||||
// console.log(str)
|
||||
// })
|
||||
|
||||
Loading…
Reference in New Issue
Block a user