mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-03 14:03:40 +01:00
more linting
This commit is contained in:
parent
6a854ce66c
commit
c692eb700f
@ -134,8 +134,9 @@ export default async function jdownloaderProxyHandler(req, res) {
|
||||
return res.status(400).json({ error: "Invalid proxy service type" });
|
||||
}
|
||||
logger.debug("Getting data from JDRss API");
|
||||
const username = widget.username
|
||||
const password = widget.password
|
||||
const {username} = widget
|
||||
const {password} = widget
|
||||
|
||||
const appKey = "homepage"
|
||||
const loginSecret = sha256(`${username}${password}server`)
|
||||
const deviceSecret = sha256(`${username}${password}device`)
|
||||
|
@ -48,8 +48,8 @@ export function encrypt(data, ivKey) {
|
||||
const stringIVKey = ivKey.toString('hex');
|
||||
const stringIV = stringIVKey.substring(0, stringIVKey.length / 2);
|
||||
const stringKey = stringIVKey.substring(stringIVKey.length / 2, stringIVKey.length);
|
||||
const iv = new Buffer(stringIV, 'hex');
|
||||
const key = new Buffer(stringKey, 'hex');
|
||||
const iv = Buffer.from(stringIV, 'hex');
|
||||
const key = Buffer.from(stringKey, 'hex');
|
||||
const cipher = crypto.createCipheriv('aes-128-cbc', key, iv);
|
||||
return cipher.update(data, 'utf8', 'base64') + cipher.final('base64');
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user