API documentation for the ion-hash-python GitHub repository.
ionhash.hasher
<simpleion_class>.ion_hash(algorithm=None, hash_function_provider=None)
Given an algorithm or hash_function_provider, computes the Ion hash of this value.
- Args:
- algorithm:
A string corresponding to the name of a hash algorithm supported by the hashlib module.
- hash_function_provider:
A function that returns a new
IonHasher
instance when called.Note that multiple
IonHasher
instances may be required to hash a single value (depending on the type of the Ion value).
- Returns:
bytes that represent the Ion hash of this value for the specified algorithm or hash_function_provider.
ionhash.hasher.hash_reader(reader, hash_function_provider)
ionhash.hasher.hash_writer(writer, hash_function_provider)