pydoc > crypt

Help on module crypt:

πŸ“– NAME

crypt β€” Wrapper to the POSIX crypt library call and associated functionality.

πŸš€ Quick Reference

Use CaseCommandDescription
πŸ”‘ Hash password with default saltcrypt.crypt(password)Hash using strongest available method
πŸ”‘ Hash password with specific methodcrypt.crypt(password, crypt.METHOD_SHA512)Hash using SHA‑512
πŸ§‚ Generate salt for default methodcrypt.mksalt()Generate salt for strongest method
πŸ§‚ Generate salt for specific methodcrypt.mksalt(crypt.METHOD_SHA256)Generate salt for SHA‑256
βœ… Check password against hashcrypt.crypt(password, stored_hash) == stored_hashVerify password

πŸ“š MODULE REFERENCE

https://docs.python.org/3.10/library/crypt.html

The following documentation is automatically generated from the Python source files. It may be incomplete, incorrect or include features that are considered implementation detail and may vary between Python implementations. When in doubt, consult the module reference at the location listed above.

πŸ”§ FUNCTIONS

πŸ” crypt(word, salt=None)

Return a string representing the one‑way hash of a password, with a salt prepended.

If salt is not specified or is None, the strongest available method will be selected and a salt generated. Otherwise, salt may be one of the crypt.METHOD_* values, or a string as returned by crypt.mksalt().

πŸ§‚ mksalt(method=None, *, rounds=None)

Generate a salt for the specified method.

If not specified, the strongest available method will be used.

πŸ“Š DATA

πŸ“ FILE

/usr/lib/python3.10/crypt.py

crypt
πŸ“– NAME πŸš€ Quick Reference πŸ“š MODULE REFERENCE πŸ”§ FUNCTIONS
πŸ” crypt(word, salt=None) πŸ§‚ mksalt(method=None, *, rounds=None)
πŸ“Š DATA πŸ“ FILE

Generated by phpman v4.9.27 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-19 17:57 @216.73.216.114
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format