fixed crypt and pass all unit tests