Minor Doc Update to password.py (#73468)

Adds in the caveat that Python's string modules have different constants depending on the major version (2.x vs 3.x), but preserves the fact that a fair amount of them are common. Other minor docs touchups also included.
pull/73660/head
Syed Ali Haider 4 years ago committed by GitHub
parent c8ee186e11
commit 5078a0baa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -28,7 +28,7 @@ DOCUMENTATION = """
required: True required: True
encrypt: encrypt:
description: description:
- Which hash scheme to encrypt the returning password, should be one hash scheme from C(passlib.hash; md5_crypt, bcrypt, sha256_crypt, sha512_crypt) - Which hash scheme to encrypt the returning password, should be one hash scheme from C(passlib.hash; md5_crypt, bcrypt, sha256_crypt, sha512_crypt).
- If not provided, the password will be returned in plain text. - If not provided, the password will be returned in plain text.
- Note that the password is always stored as plain text, only the returning password is encrypted. - Note that the password is always stored as plain text, only the returning password is encrypted.
- Encrypt also forces saving the salt value for idempotence. - Encrypt also forces saving the salt value for idempotence.
@ -37,10 +37,11 @@ DOCUMENTATION = """
version_added: "1.4" version_added: "1.4"
description: description:
- Define comma separated list of names that compose a custom character set in the generated passwords. - Define comma separated list of names that compose a custom character set in the generated passwords.
- 'By default generated passwords contain a random mix of upper and lowercase ASCII letters, the numbers 0-9 and punctuation (". , : - _").' - 'By default generated passwords contain a random mix of upper and lowercase ASCII letters, the numbers 0-9, and punctuation (". , : - _").'
- "They can be either parts of Python's string module attributes (ascii_letters,digits, etc) or are used literally ( :, -)." - "They can be either parts of Python's string module attributes or represented literally ( :, -)."
- "Other valid values include 'ascii_lowercase', 'ascii_uppercase', 'digits', 'hexdigits', 'octdigits', 'printable', 'punctuation' and 'whitespace'." - "Though string modules can vary by Python version, valid values for both major releases include:
- Be aware that Python's 'hexdigits' includes lower and upper case version of a-f, so it is not a good choice as it doubles 'ascii_lowercase', 'ascii_uppercase', 'digits', 'hexdigits', 'octdigits', 'printable', 'punctuation' and 'whitespace'."
- Be aware that Python's 'hexdigits' includes lower and upper case versions of a-f, so it is not a good choice as it doubles
the chances of those values for systems that won't distinguish case, distorting the expected entropy. the chances of those values for systems that won't distinguish case, distorting the expected entropy.
- "To enter comma use two commas ',,' somewhere - preferably at the end. Quotes and double quotes are not supported." - "To enter comma use two commas ',,' somewhere - preferably at the end. Quotes and double quotes are not supported."
type: string type: string

Loading…
Cancel
Save