Update quotes in password-hashing example

This commit is contained in:
Roman Mogylatov 2021-09-30 19:02:23 -04:00
parent 8bea62eeee
commit 274d1fe53b

View File

@ -15,8 +15,8 @@ class UserService:
def create_user(self, name: str, password: str) -> Dict[str, str]: def create_user(self, name: str, password: str) -> Dict[str, str]:
hashed_password = self._password_hasher(password) hashed_password = self._password_hasher(password)
return { return {
'name': name, "name": name,
'password': hashed_password, "password": hashed_password,
} }
@ -36,15 +36,15 @@ class Container(containers.DeclarativeContainer):
) )
if __name__ == '__main__': if __name__ == "__main__":
container = Container( container = Container(
config={ config={
'salt_size': 16, "salt_size": 16,
'rounds': 10000, "rounds": 10000,
}, },
) )
user_service = container.user_service() user_service = container.user_service()
user = user_service.create_user(name='Roman', password='secret1') user = user_service.create_user(name="Roman", password="secret1")
print(user) print(user)