def _normalize_utf8_keys(kwargs):
  if any(type(key) is six.binary_type for key in kwargs.keys()):
    # This is to preserve the original dict type for kwargs.
    dict_type = type(kwargs)
    return dict_type([(six.text_type(k), v) for k, v in kwargs.items()])
  return kwargs
Salsa 20/8 stream cypher; Used by BlockMix. See http://en.wikipedia.org/wiki/Salsa20
dataset/ETHPy150Open pantsbuild/pants/src/python/pants/engine/exp/struct.py/_normalize_utf8_keys--crossover with--dataset/ETHPy150Open ricmoo/pyscrypt/pyscrypt/hash.py/salsa20_8