Skip to content

Commit 3934f2e

Browse files
committed
chore: add clarification about guarantees around hash consistency
We're essentially generating a hash, so if the hash algorithm is changed, the hash is likely to change.
1 parent 6952b7f commit 3934f2e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/words/words.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ import (
1313
// - 5-char alphabet component: 45M
1414
// - ~2800 words, picking 2 at a time (ordered, permutation): 7.5M
1515
// - 45M * 7.5M ~= 340T
16+
//
17+
// NB: A seed will generate the same return value each time. However,
18+
// if the word list or charset is changed below, then strings
19+
// generated after that will likely be different given that same seed.
1620
func WordsAndEntropy(suffix, seedString string) string {
1721
digest := sha256.Sum256([]byte(seedString))
1822
charset := "bcdfghjkmnpqrstvwxyz23456789"

0 commit comments

Comments
 (0)