How to add item into existing encrypted 7-zip archive without redo the whole archive
7-zip provides awesome and simple encryption method using the AES-256 algorithm that is handy to encrypt sensitive credentials like private keys for cryptocurrency. However, it doesn't support to encrypt new files into an encrypted archive. The old and inefficient way to achieve this is to decrypt the old archive, make a new archive with the new items, and encrypt everything again. This is ridiculous when you just want to add a 10kb release note into a 1G archive. That computing power wasted could better spend at cryptocurrency mining.
The problem
In the encrypted 7z file we can see that the Encrypted column for the Old item.txt
is a +
, meaning this file is encrypted. You can practice this walk-through by creating a simple testing file like this.
Now we wish to add a new item to the current archive without decrypting. Drag and drop the New item.txt
into the archive and press Yes.
Under Encrypted property, there is a -
sign for the new item while the old item is still encrypted. By opening up both files, you still need to provide the password for the Old item.txt
while New item.txt
is can be opened without one.
This status remains even if you close and reopen the archive. There is no option in the tools or whatsoever to encrypt new files in the archive.
The Solution
How should we make things right by having the new file encrypted using same algorithm and password like the old file did?
Remove the new item first. Proceed to right click on the blank place of the archive and click on Open Inside.
Provide the password and now the whole archive is decrypted. Verify the encryption status by opening up the files again.
Drag and drop the New item.txt
again to the decrypted archive and press Yes.
Now you will see both files are encrypted with the +
sign. But you are still in the decryption status, to resume the encryption simply close the archive. The next time you open either file in the archive they will prompt you for the same password.
This trick is extremely handy when you want to add a few files to an encrypted archive without having to first decrypt the old archive and redo the archiving with encryption again. Cheers to the tons of time and computing power that you've saved!
Posted on Utopian.io - Rewarding Open Source Contributors
恭喜你!您的这篇文章入选 @justyy 今日榜单 【优秀被错过的文章】, 请继续努力!若您不喜欢,请回复 STOP,谢谢。
Congratulations! This post has been selected by @justyy as today's 【Good Posts You May Miss】, Steem On! Reply STOP if don't want to see this. Thanks.
之前 Utopian.io 对机器人点赞有惩罚,所以在 Utopian.io 上发的帖子都没有点赞。而且,之前的点赞规则是需要添加#cn标签。现在Utopian.io的惩罚机制去除了,所以 @cnbuddy 点赞规则也改变了。之前的赞也已经手动补上。
非常感谢,你们辛苦了。
Hey @fr3eze I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
你好!感谢你对cn区的大力支持!很开心 @cnbuddy 的成长之路有你相伴。让我们携手共创 cn 区美好的明天!如果不想收到留言,请回复“取消”。
Congratulations @fr3eze! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
Award for the number of comments received
Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here
If you no longer want to receive notifications, reply to this comment with the word
STOP
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Thank you very much.