adaptive-lighting/custom_components
Justin Paupore c785dcd202 Clean up context ID generation.
Using a sha256 hash is major overkill for the purposes of finding
a short hash of a string. This change switches _short_hash to use
Python's built-in hash() function (used for hashing in dicts and sets).
which works just fine for this, and is much faster.

In addition, since context IDs are length-limited, use base-85 encoding
to pack as many bits of the hash and index into the context as possible.
2020-10-27 22:11:19 -07:00
..
adaptive_lighting Clean up context ID generation. 2020-10-27 22:11:19 -07:00