示例#1
0
文件: main.py 项目: sreladio/cs253
 def make_cookie(self, user):
   user_id = str(user.get_id())
   user_id_hash = encryption.hash(user_id)
   return user_id + '|' + user_id_hash
示例#2
0
文件: model.py 项目: sreladio/cs253
	def create(cls, name, password, email=None):
		hashed_password = encryption.hash(password)
		return User(name=name, password=hashed_password, email=email)