0
0
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 13:21:00 +02:00

fix: remove hash extra

This commit is contained in:
Zack Scholl 2024-05-24 18:03:51 -07:00
parent 381f8369a3
commit 4091ef0496

View file

@ -198,7 +198,7 @@ func New(ops Options) (c *Client, err error) {
// Create a hash of part of the shared secret to use as the room name // Create a hash of part of the shared secret to use as the room name
// add the current day and "croc" to the shared secret to make more resistant // add the current day and "croc" to the shared secret to make more resistant
// to rainbow tables // to rainbow tables
hashExtra := "croc" + time.Now().Format("2006-01-02") hashExtra := "croc"
roomNameBytes := sha256.Sum256([]byte(c.Options.SharedSecret[:4] + hashExtra)) roomNameBytes := sha256.Sum256([]byte(c.Options.SharedSecret[:4] + hashExtra))
c.Options.RoomName = hex.EncodeToString(roomNameBytes[:]) c.Options.RoomName = hex.EncodeToString(roomNameBytes[:])