16 import hashlib, uuid, pyotp, os
17 from app
import application
20 salt = application.secret_key
21 hashed_password = hashlib.sha512(password + salt).hexdigest()
22 return hashed_password
25 totp = pyotp.TOTP(otp_key)
26 return totp.verify(otp)
def check_otp(otp, otp_key)
def hash_password(password)