# key
$ echo qEExPE+jkJxQUt8fSO+XwzXgRGh6kLHy+lWEe6Z8T6s= | xxd -l 32 -ps -c 256
7145457850452b6a6b4a785155743866534f2b58777a5867524768366b4c4879
# iv
$ echo jPNGTNLtGIBc7Jv2UXj7a3FNQk13eUJ5T3VIUXlOS0ZVOEpnMUpPMnhvQXg5bE5kMGFHejVxaTFnYTA9 | base64 -d | xxd -l 16 -ps
8cf3464cd2ed18805cec9bf65178fb6b
# encrypted text
$ echo jPNGTNLtGIBc7Jv2UXj7a3FNQk13eUJ5T3VIUXlOS0ZVOEpnMUpPMnhvQXg5bE5kMGFHejVxaTFnYTA9 | base64 -d | cut -b 17-
qMBMwyByOuHQyNKFU8Jg1JO2xoAx9lNd0aGz5qi1ga0=
# результат
$ echo qMBMwyByOuHQyNKFU8Jg1JO2xoAx9lNd0aGz5qi1ga0= | openssl AES-256-CBC -d -a -K 7145457850452b6a6b4a785155743866534f2b58777a5867524768366b4c4879 -iv 8CF3464CD2ED18805CEC9BF65178FB6B
/playlist.m3u8+1729705980
// Вспомогательные функции
const B = (str) => Uint8Array.from(str, c => c.charCodeAt(0));
const S = (buf) => String.fromCharCode(...new Uint8Array(buf));
// дано
const encryptedData = "jPNGTNLtGIBc7Jv2UXj7a3FNQk13eUJ5T3VIUXlOS0ZVOEpnMUpPMnhvQXg5bE5kMGFHejVxaTFnYTA9";
const key = "qEExPE+jkJxQUt8fSO+XwzXgRGh6kLHy+lWEe6Z8T6s=";
const iv = B(atob(encryptedData).slice(0, 16));
const cryptoKey = await crypto.subtle.importKey(
'raw',
// На самом деле используется только 32 байта из key
B(key.slice(0, 32)),
'AES-CBC',
true,
['encrypt', 'decrypt']
);
const encryptedText = B(atob(atob(encryptedData).slice(16)));
let decrypted = S(await crypto.subtle.decrypt({ name: 'AES-CBC', iv }, cryptoKey, encryptedText));
console.log(decrypted); // /playlist.m3u8+1729705980
function solution(str, ending) {
return String(str).endsWith(ending);
}
let myVar = false;
const getMyVar = () => myVar;
const setMyVar = (value) => { myVar = value };
module.exports = { getMyVar, setMyVar };
const { getMyVar, setMyVar } = require('./myVarModule');
console.log(getMyVar());
setMyVar(true);
console.log(getMyVar());
paramsSerializer.indexes
Configuration for formatting array indexes in the params.
Three available options:
(1)indexes: null
(leads to no brackets),
(2) (default)indexes: false
(leads to empty brackets),
(3)indexes: true
(leads to brackets with indexes).
axios.get('https://api.kinopoisk.dev/v1.4/movie', {
params: {
page: page,
limit: limit,
notNullFields: ['poster.url', 'movieLength']
},
paramsSerializer: {
indexes: null
}
});
for (let i = 0; i < clickCount - 1; i++) {
elementstypeWorkFirst[i].innerHTML = '';
}
{ name:"object" }
и привязал его канатом с биркой obj к земле (obj = ...
).arrq = [obj]
).obj = null
).arrq[0] = null
), то он улетит и в конце концов где-то упадёт и пропадёт (сработает сборщик мусора). Stage: 4
Two compatible implementations which pass the acceptance tests
app.options('/user', cors());
app.post('/user', cors(), ....);
?.
без пробелов.===
или ++
.