2

Creating an encrypted store-only archive seems to be possible through the GUI variants that delegate to 7zip, but I can't figure out the proper command line call.

My failed attempts result in E_INVALIDARG:

7za a ~/Desktop/tmp.7z my-big-file -em=AES256 -pMyPass -m0=Copy
Jack Wade
  • 121
  • 1
  • 2
  • In Ubuntu `man 7za` shows the zip file name and the file list as coming _after_ the options. – AFH Mar 15 '17 at 15:42
  • 1
    Just FYI... here's an answer with a 7z and 7za general comparison.: https://superuser.com/questions/1105516/comparing-7z-exe-and-7za-exe/1105522#1105522. Try it as....`7za a -mhe=on -pMyPass ~/Desktop/tmp.7z my-big-file` and then check to confirm it's 256 bit AES encrypted: https://linux.die.net/man/1/7za – Vomit IT - Chunky Mess Style Mar 15 '17 at 16:16
  • What did you determine with this @JackWade? – Vomit IT - Chunky Mess Style Apr 28 '17 at 01:10
  • 1
    @PimpJuiceIT `7za a -p -tzip -mem=AES256 -mm=Copy -mx=0 -mmt=12 ~/Desktop/fooBar.zip ~/Desktop/FooFolder` – Jack Wade Jun 28 '19 at 17:31

2 Answers2

1

I've just had to deal with this myself, I didn't find the manual to be perfectly clear on how to use Method Parameters.

Encryption Type is a Method Parameter and needs to be passed as part of an -m switch, e.g.: -mem=AES256.

Similarly, if you want to do Copy Only (no compression), you need to use -mx=0.

7za a ~/Desktop/tmp.7z my-big-file -mem=AES256 -mx=0 -pMyPass
Zac Faragher
  • 111
  • 5
0

I used 7z a -t7z -m0=Copy -mhe=on -pPassword archive.7z foldername to get around the E_INVALIDARG error.