TeiaLabs / redb

1 stars 0 forks source link

Allow choosing different hash algorithms (use multihash) #15

Open cardoso-neto opened 1 year ago

cardoso-neto commented 1 year ago

https://github.com/multiformats/py-multihash https://multihash.readthedocs.io/en/latest/api_reference.html

It could probably use a dataclass wrapper similar to what I did with github/cardoso-neto/multibase_dataclass, but it's not a must.

jojo0severo commented 1 year ago

This issue is already resolved by overriding the get_hash method, dont you think?

cardoso-neto commented 1 year ago

I'm thinking about something more "out of the box". Para trocarmos de algoritmo caso descubramos um algoritmo mais rápido tipo blake2b. The get_hash classmethod should not be overriden as it simply applies the hash function on the concatenated string values of each attribute in the hashable_fields list.