Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 2
    It looks like you can pass the whole $1$... source password as the 'salt' in python 3.x's crypt function to reuse the salt: Since a few crypt(3) extensions allow different values, with different sizes in the salt, it is recommended to use the full crypted password as salt when checking for a password. Commented Nov 21, 2018 at 16:43
  • Nice, I'll add that to the post Commented Nov 21, 2018 at 16:48
  • By the way, is crypt just for Python 3 or superior? Commented Nov 21, 2018 at 16:59
  • crypt was added in Python 2.7 but there were significant improvements from Python 3.3 and onwards. You can check the Python3 documentation on the Python site. Commented Nov 21, 2018 at 17:02
  • And a final doubt, this method works for SHA256($5$), SHA512($6$)... etc? Commented Nov 21, 2018 at 20:45