def initial_password(email):
 if (settings.INITIAL_PASSWORD_SALT is not None):
  encoded_key = (settings.INITIAL_PASSWORD_SALT + email).encode('utf-8')
  digest = hashlib.sha256(encoded_key).digest()
  return base64.b64encode(digest)[:16].decode('utf-8')
 else:
  return None

def initial_password ( email ) : if ( settings . INITIAL_PASSWORD_SALT is not None ) : encoded_key = ( settings . INITIAL_PASSWORD_SALT + email ) . encode ( 'utf-8' ) digest = hashlib . sha256 ( encoded_key ) . digest ( ) return base64 . b64encode ( digest ) [ : 16 ] . decode ( 'utf-8' ) else : return None
given an email address .