You can only encrypt new files that are being added to an archive. To enable this function, open the archive, open the options panel (press Control + o), and set the ‘Encrypt files’ option. Next, set a password in a text field below and repeat it in the text field below it. When you close the dialog by clicking the ‘OK’ button, any new file added in the session will be encrypted with the given password. When you open that archive again, you will be required to provide the password when unpacking, opening, or previewing encrypted files.
Note, that multiple files from the same archive may have different passwords.
Encrypting archive header
(7z)
You can encrypt the archive header with a password that will be required for any operation on that archive, including browsing its content. To do that, open the archive, open the options panel (press Control + o), set ‘Encrypt files’ option, provide a password (and repeat it), set the ‘Encrypt archive header’, and close the dialog by clicking the ‘OK’ button. The header of the archive, containg names of items in the archive, will be encrypted when any new file is added to it. Also all the newly added files will be encrypted, but not files already in the archive.
Note, that when there are encrypted items in the archive when the encryption of the archive header is enabled, all the passwords need to match. Otherwise, you will be able to access the encrypted archive but not files in it encrypted with a different password.