From 6da95e80204b689df0fa74169c55bd283bcba8eb Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 12:43:31 +0000 Subject: [PATCH] style: format code with Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, Google Java Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt, Scalafmt, StandardJS, StandardRB, swift-format and Yapf This commit fixes the style issues introduced in 1c54c9a according to the output from Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, Google Java Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt, Scalafmt, StandardJS, StandardRB, swift-format and Yapf. Details: None --- security/authentication.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/security/authentication.py b/security/authentication.py index f85c9eb66..54d08b6c3 100644 --- a/security/authentication.py +++ b/security/authentication.py @@ -1,14 +1,19 @@ import hashlib import secrets + class Authentication: def __init__(self): self.salt = secrets.token_hex(16) def generate_password_hash(self, password): - password_hash = hashlib.pbkdf2_hmac('sha256', password.encode(), self.salt.encode(), 100000) + password_hash = hashlib.pbkdf2_hmac( + "sha256", password.encode(), self.salt.encode(), 100000 + ) return password_hash.hex() def verify_password(self, password, password_hash): - password_hash_check = hashlib.pbkdf2_hmac('sha256', password.encode(), self.salt.encode(), 100000) + password_hash_check = hashlib.pbkdf2_hmac( + "sha256", password.encode(), self.salt.encode(), 100000 + ) return password_hash_check.hex() == password_hash