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

Support editing archives, keeping encrypted notes #65

Merged
merged 8 commits into from
Dec 26, 2021

Conversation

covert-encryption
Copy link
Owner

@covert-encryption covert-encryption commented Dec 23, 2021

Implements covert edit CLI command that extracts an existing archive, allows editing its text and then re-encrypts the data. Any attached files of the archive are kept without extracting them or the message to disk. The original file is overwritten.

This function is intended to allow adding and removing attachments, as well as using public keys, but for now it is limited to message editing and passphrases. Also, all data must fit in RAM, as no streaming is yet implemented for this mode.

Fixes #57

@codecov
Copy link

codecov bot commented Dec 23, 2021

Codecov Report

Merging #65 (c8d9761) into main (1980da9) will increase coverage by 1.89%.
The diff coverage is 84.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #65      +/-   ##
==========================================
+ Coverage   68.96%   70.85%   +1.89%     
==========================================
  Files          22       22              
  Lines        2088     2131      +43     
  Branches      488      499      +11     
==========================================
+ Hits         1440     1510      +70     
+ Misses        508      485      -23     
+ Partials      140      136       -4     
Impacted Files Coverage Δ
covert/tty.py 13.75% <16.66%> (+0.07%) ⬆️
covert/cli.py 74.13% <87.50%> (+11.27%) ⬆️
covert/__main__.py 77.41% <100.00%> (+3.03%) ⬆️
covert/archive.py 64.93% <100.00%> (+0.24%) ⬆️
covert/passphrase.py 60.00% <100.00%> (+0.27%) ⬆️
covert/util.py 95.00% <100.00%> (+0.08%) ⬆️
covert/lazyexec.py 63.33% <0.00%> (+3.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1980da9...c8d9761. Read the comment docs.

@covert-encryption
Copy link
Owner Author

This needs still some additional work on decoding from pipe (an unrelated bug discovered while testing the new feature), but should be essentially usable now. Armor decoding got an optimisation that makes it noticeably faster for large data.

As additional benefits on end-to-end testing, we can now use stdio pipes and hashing passwords is much faster.

@covert-encryption
Copy link
Owner Author

Will need to address that FIXME added in another PR prior to 0.6 release.

@covert-encryption covert-encryption merged commit 1fb22f3 into main Dec 26, 2021
@covert-encryption covert-encryption deleted the edit-command branch December 26, 2021 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UI] Editing encrypted files
2 participants