Код: Выделить всё
function solveFunction(encryptedText) {
console.log("Decrypt starting...");
if (!encryptedText || encryptedText.trim() === "") {
console.error("unavaible");
}
try {
const decryptedBytes = CryptoJS.AES.decrypt(encryptedText, secretKey);
const decryptedText = decryptedBytes.toString(CryptoJS.enc.Utf8);
if (!decryptedText) {
console.warn("failed!");
return "error: failed";
}
return decryptedText;
} catch (error) {
console.error("error:", error.message);
return "error";
}
}
Как мне преобразовать этот код в Python?
Подробнее здесь: https://stackoverflow.com/questions/791 ... -in-python
Мобильная версия