I suggest using a pre-built tried and true method. They exist for a reason. If you only want to do one way encryption, then MD5 is the way to go.

Tg