How to verify the password generated by ENCRYPT?
When you store a password you have to store encrypt(password,salt) and salt for this user. To check if input from user is the right password you comapre encrypt(input,salt) with the stored encrypted string. Chanck the section about 8.6.2 What Is Salt? in 
Practical UNIX &amp; Internet Security, by Simson Garfinkel &amp; Gene Spafford from O'Reilly.