Update app.js

This commit is contained in:
Namhyeon Go 2024-01-26 16:57:53 +09:00
parent 79c64726e2
commit bafc0a085d

15
app.js
View File

@ -294,12 +294,17 @@ function require(FN) {
case ".enc": // Encrypted case ".enc": // Encrypted
T = (function(encryptedData) { T = (function(encryptedData) {
var toolkit = CreateObject("WelsonJS.Toolkit"); try {
var userKey = ''; var toolkit = CreateObject("WelsonJS.Toolkit");
while (userKey.length == 0 || userKey.length > 16) { var userKey = '';
userKey = toolkit.Prompt("Enter the password:"); while (userKey.length == 0 || userKey.length > 16) {
userKey = toolkit.Prompt("Enter the password:");
}
return toolkit.DecryptStringHIGHT(encryptedData);
} catch (e) {
console.error("Failed to load the encrypted data:", e.message);
return '';
} }
return toolkit.DecryptStringHIGHT(encryptedData);
})(T); })(T);
break; break;