mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-11 09:24:58 +00:00
Update app.js
This commit is contained in:
parent
302b33d48b
commit
94f11d73cd
9
app.js
9
app.js
|
@ -309,10 +309,15 @@ function require(pathname) {
|
|||
case ".enc": // HIGHT(ISO/IEC 18033-3) encrypted
|
||||
T = (function(encryptedData, ToolkitInterface) {
|
||||
try {
|
||||
var userKey = '';
|
||||
while (userKey.length == 0 || userKey.length > 16) {
|
||||
var userKey = '', t = 0, k = 6;
|
||||
while (t < k && (userKey.length == 0 || userKey.length > 16)) {
|
||||
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);
|
||||
} catch (e) {
|
||||
console.error("Failed to load the encrypted data:", e.message);
|
||||
|
|
Loading…
Reference in New Issue
Block a user