mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 06:54:58 +00:00
Update encryptor.js
This commit is contained in:
parent
4c88348ddf
commit
e0df993bad
|
@ -12,11 +12,18 @@ function main(args) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
var dstfile = filename + ".enc";
|
||||
if (FILE.fileExists(dstfile)) {
|
||||
console.error(dstfile, "already exists. Please delete it.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
var filename = args[0];
|
||||
var userKey = '';
|
||||
while (userKey.length == 0 || userKey.length > 16) {
|
||||
userKey = Toolkit.prompt("Please enter the password for encryption:");
|
||||
}
|
||||
|
||||
var data = FILE.readFile(filename, FILE.CdoCharset.CdoUTF_8);
|
||||
var encryptedData = Toolkit.encryptStringHIGHT(userKey, data);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user