code: def password_hash(password):
      
      try:
          return bcrypt_sha256.encrypt(password)
      except TypeError:
          return bcrypt_sha256.encrypt(password.decode('utf-8'))
docs: Hash the password, using bcrypt+sha256.
  
      .. versionchanged:: 1.1.0
  
      :param str password: Password in plaintext
      :return: password hash
      :rtype: str