def make_cookie(self, user): user_id = str(user.get_id()) user_id_hash = encryption.hash(user_id) return user_id + '|' + user_id_hash
def create(cls, name, password, email=None): hashed_password = encryption.hash(password) return User(name=name, password=hashed_password, email=email)