fast-cocos 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/xor/src/xor.js +2 -2
- package/package.json +1 -1
package/dist/xor/src/xor.js
CHANGED
|
@@ -57,7 +57,7 @@ function encryptFile(opts) {
|
|
|
57
57
|
const signature = Buffer.from(finalSign, "utf-8");
|
|
58
58
|
const output = Buffer.concat([signature, encrypted]);
|
|
59
59
|
fs_1.default.writeFileSync(destPath, output);
|
|
60
|
-
console.info("\x1b[32m%s\x1b[0m", `加密: ${
|
|
60
|
+
console.info("\x1b[32m%s\x1b[0m", `加密: ${opts.inputPath} -> ${destPath} [sign:${finalSign}, key:${finalKey.substring(0, 4)}...]`);
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* 解密文件(校验签名头 + XOR)
|
|
@@ -91,7 +91,7 @@ function decryptFile(opts) {
|
|
|
91
91
|
const dataWithoutSign = encryptedData.subarray(signSize);
|
|
92
92
|
const decrypted = xorTransform({ data: dataWithoutSign, key: finalKey });
|
|
93
93
|
fs_1.default.writeFileSync(destPath, decrypted);
|
|
94
|
-
console.log(`解密: ${
|
|
94
|
+
console.log(`解密: ${opts.inputPath} -> ${destPath} [sign:${finalSign}, key:${finalKey.substring(0, 4)}...]`);
|
|
95
95
|
return true;
|
|
96
96
|
}
|
|
97
97
|
/**
|