Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing number in SHA-256 docstring and add hyphen for SHA hashes #1751

Merged
merged 1 commit into from Nov 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions faker/providers/misc/__init__.py
Expand Up @@ -70,9 +70,9 @@ def md5(self, raw_output: bool = False) -> Union[bytes, str]:
return res.hexdigest()

def sha1(self, raw_output: bool = False) -> Union[bytes, str]:
"""Generate a random SHA1 hash.
"""Generate a random SHA-1 hash.

If ``raw_output`` is ``False`` (default), a hexadecimal string representation of the SHA1 hash
If ``raw_output`` is ``False`` (default), a hexadecimal string representation of the SHA-1 hash
will be returned. If ``True``, a ``bytes`` object representation will be returned instead.

:sample: raw_output=False
Expand All @@ -84,9 +84,9 @@ def sha1(self, raw_output: bool = False) -> Union[bytes, str]:
return res.hexdigest()

def sha256(self, raw_output: bool = False) -> Union[bytes, str]:
"""Generate a random SHA256 hash.
"""Generate a random SHA-256 hash.

If ``raw_output`` is ``False`` (default), a hexadecimal string representation of the SHA56 hash
If ``raw_output`` is ``False`` (default), a hexadecimal string representation of the SHA-256 hash
will be returned. If ``True``, a ``bytes`` object representation will be returned instead.

:sample: raw_output=False
Expand Down