Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encryption doesn't work in CLI #84

Closed
j4k0xb opened this issue Sep 16, 2024 · 1 comment · Fixed by #85
Closed

encryption doesn't work in CLI #84

j4k0xb opened this issue Sep 16, 2024 · 1 comment · Fixed by #85
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@j4k0xb
Copy link
Contributor

j4k0xb commented Sep 16, 2024

$ asarmor -a app.asar -o encrypted.asar --encryption
$ md5sum *.asar
794dd6176606b585dd6d13ad84fd47cf  app.asar
794dd6176606b585dd6d13ad84fd47cf  encrypted.asar

the encrypted output is overwritten with the input asar (line 72):

asarmor/bin/asarmor.ts

Lines 53 to 73 in 2c91d08

if (options.encryption) {
await encrypt({
src: options.archive,
dst: options.output,
});
}
const asarmor = await open(options.archive);
if (options.restore) {
await asarmor.restoreBackup();
} else if (options.output) {
if (options.backup) await asarmor.createBackup();
if (options.bloat)
asarmor.patch(
createBloatPatch(options.bloat === true ? undefined : options.bloat)
);
await asarmor.write(options.output);
}

@sleeyax
Copy link
Owner

sleeyax commented Dec 21, 2024

Hi @j4k0xb would you be interested in creating a PR to solve this issue?

@sleeyax sleeyax added good first issue Good for newcomers bug Something isn't working labels Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants