From 994a7fd012a91f5798968b34b1f2993db3e5db79 Mon Sep 17 00:00:00 2001 From: Augustin LAVILLE Date: Fri, 18 Nov 2022 14:04:29 +0100 Subject: [PATCH] Add missing number in SHA-256 docstring and add hyphen for SHA hashes --- faker/providers/misc/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/faker/providers/misc/__init__.py b/faker/providers/misc/__init__.py index aea4bf73f2..215047ba58 100644 --- a/faker/providers/misc/__init__.py +++ b/faker/providers/misc/__init__.py @@ -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 @@ -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