How to add item into existing encrypted 7-zip archive without redo the whole archive

in #utopian-io7 years ago

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

1.png

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.

2.png

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.

3.png

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

4.png

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.

5.png

Provide the password and now the whole archive is decrypted. Verify the encryption status by opening up the files again.

6.png

Drag and drop the New item.txt again to the decrypted archive and press Yes.

7.png

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

Sort:  

恭喜你!您的这篇文章入选 @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

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • You are generating more rewards than average for this category. Super!;)
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

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

By upvoting this notification, you can help all Steemit users. Learn how here!

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Thank you very much.

Coin Marketplace

STEEM 0.18
TRX 0.14
JST 0.030
BTC 57983.59
ETH 3132.93
USDT 1.00
SBD 2.44