Zip encryption

Hi,

Is it possible to encrypt zip files using shell script?

If I try something like this:

set myString to "zip -e -P juba" & space & "/Users/someuser/Desktop/test.html" & space & "/Users/someuser/Desktop/test.zip"
do shell script myString

I get the following error:
“zip error: Invalid command arguments (stderr is not a tty)”

The thread: http://bbs.macscripter.net/viewtopic.php?pid=63164 explains that the zip tool shipped with OS X does not support encryption. However, I can create encrypted zip files manually, but the password must be typed twise at a prompt.

From man zip:

Thank you for replying.

I was able to set a password to the zip-files by removing the “-e” argument, and simply use “-P SomePassword”

But you should know, this procedure is not very secure!

As far as I know passing a password with the -e flag from a script is not possible