Service to "Make Protected Zip" files

Mac OS X has long supported password encrypted zip files, but you have to use command line to do it. So here is a simple Automator based Service to give you a GUI.

OpenAutomator and choose “Service” (the gear). Change “Service receives selected” to Files or folders in “Finder.app”
Add the “Run Applescript” step and then copy the code below and replace all the code in the “Run Applescript” command with this code.

Choose save, naming it something like “Make Protected Zip”, then test it by going to the finder and selecting one or more files/folders. Scroll down to the “Services” Menu and select the service with the name you just saved as.

on run {input, parameters}
set dialogResults to display dialog “Name for zipped file (no extension)” default answer “Archive” buttons {“OK”, “Cancel”} default button “OK”
if button returned of dialogResults is “OK” then
set passwd to …

Source: Mac OSX Hints