A hash is not reversible, so you’d need a database index to recover the original efficient-to-index identifier, which misses the whole point ;)
If you didn’t care about index clustering then just use UUIDv4
If you didn’t care about index clustering then just use UUIDv4