The zip command line tool has many options, but a very typical use-case is to create an encrypted archive of a folder:
zip -er [name.zip] [/path/to/folder]
...where -e is encrypt, and -r is recursive.