nip.utils.string.get_hash_parity

nip.utils.string.get_hash_parity#

nip.utils.string.get_hash_parity(input_string: str) int[source]#

Hashes the input string using SHA-256 and checks the parity of the resulting hash.

Parameters:

input_string (str) – The string to be hashed.

Returns:

int (0 if the hash is even, 1 if the hash is odd.)