Remove uniuri dependency
uniuri is only used in a minor way, to generate a random string for local identification of a snowflake client.
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Author
- Author
This patch replaces
uniuri.New()
with a manual call tocrypto/rand.Read
. Panicking on read error is the same thing uniuri does. 8 hex-encoded bytes are the same length asuniuri.New()
, but only 64 bits compared touniuri.New()
's ~95 bits (16 characters of base-62).Trac:
Status: assigned to needs_review The code looks fine and the only place I see this being used is the datachannel label which has no uniqueness requirements.
https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/label
Does that change with turbotunnel? If not, I'd say merge ready.
- Author
Thanks for the review. Merged as 8eef3b63482deb50d988e3703b7a718802cdd2f1.
Now, we just have to remember to actually remove the dependency from Tor Browser the next time we update Snowflake there.
Trac:
Status: needs_review to closed
Resolution: N/A to fixed - Trac closed
closed