mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-08 20:56:04 +00:00
Update app.js
This commit is contained in:
parent
302b33d48b
commit
94f11d73cd
11
app.js
11
app.js
|
@ -309,10 +309,15 @@ function require(pathname) {
|
||||||
case ".enc": // HIGHT(ISO/IEC 18033-3) encrypted
|
case ".enc": // HIGHT(ISO/IEC 18033-3) encrypted
|
||||||
T = (function(encryptedData, ToolkitInterface) {
|
T = (function(encryptedData, ToolkitInterface) {
|
||||||
try {
|
try {
|
||||||
var userKey = '';
|
var userKey = '', t = 0, k = 6;
|
||||||
while (userKey.length == 0 || userKey.length > 16) {
|
while (t < k && (userKey.length == 0 || userKey.length > 16)) {
|
||||||
userKey = ToolkitInterface.Prompt("This file has been encrypted. Please enter the password:");
|
if (t > 0) {
|
||||||
|
console.error("Invalid key length");
|
||||||
}
|
}
|
||||||
|
userKey = ToolkitInterface.Prompt("This file has been encrypted. Please enter the password:");
|
||||||
|
t++;
|
||||||
|
}
|
||||||
|
if (t == k) return '';
|
||||||
return ToolkitInterface.DecryptStringHIGHT(userKey, encryptedData);
|
return ToolkitInterface.DecryptStringHIGHT(userKey, encryptedData);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Failed to load the encrypted data:", e.message);
|
console.error("Failed to load the encrypted data:", e.message);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user