7z a archive.7z -psecret -mhe *.txt
compresses *.txt files to archive.7z using password "secret". Also it encrypts archive headers (-mhe switch), so filenames will be encrypted.
7z x archive.zip -psecret
extracts all files from archive.zip using password "secret".
a (Add), d (Delete), e (Extract), t (Test), u (Update), x (Extract with full paths)