How to implement the crypt option in Python 3?
I understand that the use is:
Hash = crypt.crypt(password, salt)
However, the function has a set of different hashing functions. From the documentation:
crypt.METHOD_SHA512 A Modular Crypt Format method with 16 character salt and 86 character hash. This is the strongest method.
crypt.METHOD_SHA256 Another Modular Crypt Format method with 16 character salt and 43 character hash.
crypt.METHOD_MD5 Another Modular Crypt Format method with 8 character salt and 22 character hash.
crypt.METHOD_CRYPT The traditional method with a 2 character salt and 13 characters of hash. This is the weakest method.
Again my question is how do I chose which algorithm the function uses?
This is a very basic question I can't believe that I failed to find the answer on my own - I apologise if I'm wasting your time.