caikit.core.toolkit.reversible_hasher ===================================== .. py:module:: caikit.core.toolkit.reversible_hasher .. autoapi-nested-parse:: The ReversibleHasher provides a simple obfuscation tool for munging strings in a reversible way. It is useful when needing a repeatable way to obfuscate a string that may come from a configuration detail that should not be transparently visible to a user, but needs to be trivially reversed, possibly with entirely new in-memory state. WARNING: This utility is intentionally not a cryptographically secure hash! It is explicitly designed to be reversible. Attributes ---------- .. autoapisummary:: caikit.core.toolkit.reversible_hasher._RAND_INST caikit.core.toolkit.reversible_hasher._CHARSET caikit.core.toolkit.reversible_hasher._SHUFFLED caikit.core.toolkit.reversible_hasher.FORWARD_MAP caikit.core.toolkit.reversible_hasher.BACKWARD_MAP Classes ------- .. autoapisummary:: caikit.core.toolkit.reversible_hasher.ReversibleHasher Module Contents --------------- .. py:data:: _RAND_INST .. py:data:: _CHARSET :value: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_' .. py:data:: _SHUFFLED :value: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's',... .. py:data:: FORWARD_MAP .. py:data:: BACKWARD_MAP .. py:class:: ReversibleHasher .. py:attribute:: __doc__ :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """The ReversibleHasher provides a simple obfuscation tool for munging strings in a reversible way. It is useful when needing a repeatable way to obfuscate a string that may come from a configuration detail that should not be transparently visible to a user, but needs to be trivially reversed, possibly with entirely new in-memory state. WARNING: This utility is intentionally not a cryptographically secure hash! It is explicitly designed to be reversible. """ .. raw:: html
.. py:method:: hash(val: str) :classmethod: .. py:method:: reverse_hash(hash_val: str) :classmethod: