need encrypt form

Hi,
i need to encrypt and decrypt of a string. pls provide me some syntax or any method available using shell script.

i know one method i.e.,
perl -e 'print pack "H*","message"'
so if perl command doesnt work then what is the other method to encrypt and decrypt.

Thanks in advance.