crypt.mksalt(method=None)
Return a randomly generated salt of the specified method. If no method is given, the strongest method available as returned by methods()
is used.
The return value is a string either of 2 characters in length for crypt.METHOD_CRYPT
, or 19 characters starting with $digit$
and 16 random characters from the set [./a-zA-Z0-9]
, suitable for passing as the salt argument to crypt()
.
New in version 3.3.
Please login to continue.