You can probably turn up a lot of information on this topic if you use Super Search. You can take a look here to get a nice tutorial of how to use encryption. That link came from this node and there are lots of others around here such as How do I decode encrypted password files? and A very simple userid/password check. Hopefully, some of these will have what you're looking for.
in reply to Encoding Password
If you still can't find what you're looking for or are having trouble with a specific portion of the encryption, post what you're having trouble with and maybe I can be of more help. Hopefully, this will at least get you started.
Skepticism is the source of knowledge as much as knowledge is the source of skepticism.