libs5-go/protocol/protocol.go

14 lines
191 B
Go
Raw Normal View History

2024-01-06 11:33:46 +00:00
package protocol
import "crypto/rand"
func GenerateChallenge() []byte {
challenge := make([]byte, 32)
_, err := rand.Read(challenge)
if err != nil {
panic(err)
}
return challenge
}