QldbHash Reference

class pyqldb.util.qldb_hash.QldbHash(qldb_hash)[source]

A QLDB hash is either a 256 bit number or a special empty hash.

Raises

ValueError – When the hash is None or is not the correct hash size.

dot(that)[source]

Sort the current hash value and the hash value provided by that, comparing by their signed byte values in little-endian order.

Parameters

that (bytes) – The Ion hash of Ion value to compare.

Return type

pyqldb.util.qldb_hash.Qldbhash/object

Returns

An QldbHash object that contains the concatenated hash values.

get_hash_size()[source]
get_qldb_hash()[source]
is_empty()[source]
static to_qldb_hash(value)[source]

The QldbHash of an IonValue is just the IonHash of that value.

Parameters

value (str/amazon.ion.simple_types.IonSymbol) – The string or Ion value to be converted to Ion hash.

Return type

pyqldb.util.qldb_hash.Qldbhash/object

Returns

An QldbHash object that contains Ion hash.