14 lines
191 B
Go
14 lines
191 B
Go
|
package protocol
|
||
|
|
||
|
import "crypto/rand"
|
||
|
|
||
|
func GenerateChallenge() []byte {
|
||
|
challenge := make([]byte, 32)
|
||
|
_, err := rand.Read(challenge)
|
||
|
if err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
|
||
|
return challenge
|
||
|
}
|