Beispiel #1
0
 def check_password(self, password):
     return MyHash.verify(password, self.password)
Beispiel #2
0
 def set_password(self, newpassword):
     try:
         self.password = MyHash.encrypt(newpassword)
         return 0
     except:
         return 1
Beispiel #3
0
 def __init__(self, username, password, email):
     self.username = username
     self.password = MyHash.encrypt(password)
     self.email = email
     self.ctime = datetime.datetime.today()
     self.id = str(uuid.uuid3(uuid.NAMESPACE_DNS, str(uuid.uuid1())))