Shell script for encrypting a string

Hi,
I am new to Unix server and shell scripting.I want to encrypt username/password using shell script.I know that there's a Crypt command to encrypt but it is not installed in my unix server and cannot be installed due to some reason.So i want the shell script of the crypt command or is there any other way to do encryption?

Thanks in advance.

There really is no shell script of the crypt command. It is a C program.

You do understand that the encryption for passwords is one way. And not all systems use crypt they may use md5 or SHA1 or some other hash routine.

Maybe if you tell us what you need, rather than how you think you should do it, we could give you contructive help.

I just want to write a shell script for encrypting username/password and another script for decrypting it.

I have a funny feeling this is a home work.
Still. May be this might be good to get started.

tr '[a-z]' 'qweasdzxcrfvbgtyhnmjuiklop' file

May need to add Upper chars, numbers, and the sink.
But you get the idea.