Creating function to encrypt password

It is not encryption, this is hash. And you should not use this method (which is crypt method from the Unix) as it is highly unsafe way. If you want something secure, then check Comeonin with Argon or Bcrypt functions.

3 Likes