Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def verificar(user , password):
- try:
- ver = usuario.objects.get(username=user)
- except usuario.DoesNotExist:
- return False
- c=hashlib.sha256(str(password).encode()).hexdigest()
- if ver.password==c:
- return True
- else:
- return False
Add Comment
Please, Sign In to add comment