# Path: app.py



import os
import sys
from werkzeug.security import generate_password_hash, check_password_hash
from app import app
# -*- coding: utf-8 -*-
"""
    security.salted
    ~~~~~~~~~~~~~~~

    Salted Passwords
    http://flask.pocoo.org/snippets/54/
"""

sys.path.insert(0, os.path.dirname(os.path.abspath(os.path.dirname(__file__))))




class User(object):
    
    def __init__(self, username, password):
        self.username = username
        self.set_password(password)

    def set_password(self, password):
        self.pw_hash = generate_password_hash(password)

    def check_password(self, password):
        return check_password_hash(self.pw_hash, password)



# Path: app.py



# Path: security/salted_password.py
import os
import sys
from werkzeug.security import generate_password_hash, check_password_hash
from app import app

# -*- coding: utf-8 -*-
"""
    security.salted
    ~~~~~~~~~~~~~~~

    Salted Passwords
    http://flask.pocoo.org/snippets/54/
"""

sys.path.insert(0, os.path.dirname(os.path.abspath(os.path.dirname(__file__))))




class User(object):
    
    def __init__(self, username, password):
        self.username = username
        self.set_password(password)

    def set_password(self, password):
        self.pw_hash = generate_password_hash(password)

    def check_password(self, password):
        return check_password_hash(self.pw_hash, password)



@app.route('/')