Skip to content

Conversation

@thecristen
Copy link
Collaborator

Minor note: this changes handling of a single argument which isn't a binary - instead of hashing it directly it'll be wrapped in a list (e.g. :erlang.phash2([arg]) instead of :erlang.phash2(arg))

But I also took the suggestion to increase the range via the second argument of :erlang.phash2/2

@thecristen thecristen requested a review from a team as a code owner April 7, 2025 16:15
Copy link
Contributor

@anthonyshull anthonyshull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also think about using a stronger hash in the future:

> :crypto.hash(:sha3_512, "10590") |> Base.encode16()
"EA5504962775343FC4A835AEB4C19FA2D99AF9ECE1107740EFCAFA79169780FF221F8AC7DD0D08450954CE0E94B823AE0B2B8C1BD1AB6D315A4D7EA0A3A994BF"
> :crypto.hash(:sha3_512, "2783") |> Base.encode16()
"11FFE740A2720960975F271FF01FE42B617884EFF1BF1059C596A45F9766952D15CE9AEEB497A1645F2FB00A18D7B0BC6CFAC4383ABB1261E259AE2F15B158CB"

@thecristen thecristen merged commit fe80d84 into main Apr 7, 2025
20 checks passed
@thecristen thecristen deleted the cbj/key-gen-binary branch April 7, 2025 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants