.oO turn on ~ tune in ~ drop out Oo.
Encrypt/Decrypt 7z archive files
Encrypt/Decrypt 7z archive files

Encrypt/Decrypt 7z archive files

To add files to a 7z archive with header encryption use:

7z a archive.7z *.jpg -pSECRET -mhe=on

a / Adds files to the archive
-p{Password} / Sets Password
-mhe=on|off / Enables or disables archive header encryption (default is off). File names will be encrypted as well.

To extract files from an encrypted 7z archive use:

7z e archive.7z -pSECRET

e / Extracts files from the archive

To list archive and compressed file properties (path, size, method, encryption) of a 7z archive use:

7z l -slt archive.7z

If header encryption is used, you need to provide the password to see the properties.

-list / List
-slt / Sets technical mode for l (list) command