Skip to content

Commit

Permalink
User password
Browse files Browse the repository at this point in the history
  • Loading branch information
99omniaashraf committed Jan 24, 2024
1 parent 9a11ae0 commit c08a178
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 0x00-challenge/3-user.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def password(self, pwd):
if pwd is None or type(pwd) is not str:
self.__password = None
else:
self._password = hashlib.md5(pwd.encode()).hexdigest().lower()
self.__password = hashlib.md5(pwd.encode()).hexdigest().lower()

def is_valid_password(self, pwd):
"""
Expand All @@ -54,7 +54,7 @@ def is_valid_password(self, pwd):
return False
if self.__password is None:
return False
return hashlib.md5(pwd.encode()).hexdigest().upper() == self.__password
return hashlib.md5(pwd.encode()).hexdigest().lower() == self.__password


if __name__ == '__main__':
Expand Down

0 comments on commit c08a178

Please sign in to comment.