Updated for crypt function changes