I'm not exactly sure what you're looking to do, but one of the following will create a hash of whatever is echoed through it-
echo "Password" | md5
echo "Password" | base64
Hopefully that is something you can use.
Edit: I would go with the md5 hash as that is surely more secure (although either one may be just fine depending on how you plan to use it)
Someone may also have better ideas.
Edit 2: Ok, another thought on this. If you just need to pass a password to a script being run from the JSS in a policy, another approach you can take is to assign the password to parameter 4 or whichever number you happen to like. That way its not hardcoded in the script itself, but managed by the JSS.
For example, in your script, include a section that defines a variable called 'Pass' to $4, like so:
Pass=""
if [ "$4" != "" ] && [ "$Pass" == "" ]; then
Pass=$4
fi
Also a good idea to have a check in place in the script to be sure it has a password it can use, like this:
if [ "$Pass" == "" ]; then
echo "Error: The parameter 'Pass' is blank. Please specify a value."
exit 1
fi
When you upload your script in Casper Admin (after thorough testing) make sure to assign the label for parameter 4 as "Password" or something like that. When you later assign it to a policy, the "Password" label will show up. Make sure you enter the actual password in that section. When the script runs, the JSS will send that password down to the script, since the script knows it should be looking at $4 for the actual password.
Make sense?