I know "encrypt" isn't the right description here. It's more like trying to "obfuscate" or "scramble" a password in a plaintext shell script. Say you have a UNIX shell script that does FTP to Windows ...
shc is a popular tool for protecting shell scripts that contain sensitive information such as passwords. Its popularity was driven partly by auditors' concern over passwords in scripts. shc encrypts ...