# from cryptography.hazmat.primitives.kdf import pbkdf2
if 82 - 82: Iii1i
from exts import db
from datetime import datetime
if 87 - 87: Ii % i1i1i1111I . Oo / OooOoo * I1Ii1I1 - I1I
from shortuuid import uuid
from models . iccard import TBController , TSOperator
import rsa
from vwAppConfig import WGTools
if 81 - 81: i1 + ooOOO / oOo0O00 * i1iiIII111 * IiIIii11Ii
if 84 - 84: ooo000 - Ooo0Ooo + iI1iII1I1I1i . IIiIIiIi11I1
if 98 - 98: I11iiIi11i1I % oOO
if 31 - 31: i1I
if 9 - 9: IiI11Ii111 / oOo0O00 / IiIIii11Ii - I11iiIi11i1I - iI1iII1I1I1i
__all__ = [
 "OperatorModel" ,
 ]
class OperatorModel ( TSOperator ) :
 def __init__ ( self , * args , ** kwargs ) :
  if "password" in kwargs :
   self . password = kwargs . get ( 'password' )
   kwargs . pop ( "password" )
  super ( OperatorModel , self ) . __init__ ( * args , ** kwargs )
  if 16 - 16: i1i1i1111I / i1iiIII111
 @ property
 def password ( self ) :
  return self . f_Password
  if 3 - 3: i1 % i1 % i1i1i1111I . Ii * i1
 @ password . setter
 def password ( self , raw_password ) :
  self . f_Password = WGTools . getHexString ( rsa . compute_hash ( raw_password . encode ( "utf-8" ) , 'SHA-512' ) )
  if 9 - 9: i1iiIII111
  if 10 - 10: ooOOO / IIiIIiIi11I1 * oOO / i1I / i1I
  if 61 - 61: Ooo0Ooo - I1I
  if 13 - 13: Ooo0Ooo
  if 46 - 46: iI1iII1I1I1i - Ii * Oo * Ii
 def check_password ( self , raw_password ) :
  if 52 - 52: Oo + I1I / oOO / OooOoo - I1Ii1I1 - ooOOO
  if 60 - 60: iI1iII1I1I1i . oOO
  if 13 - 13: oOO
  iiIII = self . password == WGTools . getHexString ( rsa . compute_hash ( raw_password . encode ( "utf-8" ) , 'SHA-512' ) )
  return iiIII
  if 28 - 28: I1Ii1I1 . Iii1i - ooOOO - iI1iII1I1I1i
 def has_permission ( self , permission ) :
  return True
  if 37 - 37: oOO * IIiIIiIi11I1 * I1I / oOo0O00
  if 28 - 28: i1I
# dd678faae9ac167bc83abf78e5cb2f3f0688d3a3
