-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Is your feature request related to a problem? Please describe.
It was confusing to figure out how to use the CustomHashing feature, and I discovered that naively constructing numbers from hex encoded cryptographic hashes, such as sha256 or shake256 can lead to scenarios where the filter always returns true.
Describe the solution you'd like
An example showing how to use cryptographic hashes, more precisely, how to safely convert from a hex encoded string to a number.... is it ok to truncate? Why not use BigInt?
Some explanation of how to use standard hash functions safely would be awesome.
Acceptation criterias
unit tests for sha256 and shake256.
Additional context
in some environments (regulated / security oriented) only specific hash functions are allowed,
it would be nice to have examples that are compliant to build from.