old_contents: import api
  import bcrypt
  import hashlib
  
  def hasher(data):
  	initialH = hashlib.sha256(data)
  	salt = bcrypt.gensalt()
  	return(bcrypt.hashpw(initialH, salt))
  
  api.addHasher('ip', hasher)
  
  def comparer(hash, hash):
  	return(hash == hash)
  
  api.addComparer('ip', comparer)
  
new_contents: import bcrypt
  import hashlib
  import modules
  
  def hasher(data):
  	initialH = hashlib.sha256(data)
  	salt = bcrypt.gensalt()
  	return(bcrypt.hashpw(initialH, salt))
  
  modules.receiver.rec.addHasher('ip', hasher)
  
  def comparer(SID, UID, site):
  	ssd = db['sessionData_site-' + site]
  	sud = db['userData_site-' + site]
  	session = ssd.find_one({'sessionID':SID})
  	user = sud.find_one({'userID':UID})
  	return(session['data'] == user['data'])
  
  modules.receiver.api.addComparer('ip', comparer)
  
subject: Update ip_adress_checker.py ip checker component