def get_sha256_str(base_str):
 if isinstance(base_str, six.text_type):
  base_str = base_str.encode('utf-8')
 return hashlib.sha256(base_str).hexdigest()

def get_sha256_str ( base_str ) : if isinstance ( base_str , six . text_type ) : base_str = base_str . encode ( 'utf-8' ) return hashlib . sha256 ( base_str ) . hexdigest ( )
returns string that represents sha256 hash of base_str .