Completing password crypt function