go-http-peering/server/util_test.go
2019-02-04 17:09:25 +01:00

15 lines
214 B
Go

package server
import (
"crypto/rand"
"crypto/rsa"
)
func mustGeneratePrivateKey() *rsa.PrivateKey {
privateKey, err := rsa.GenerateKey(rand.Reader, 2048)
if err != nil {
panic(err)
}
return privateKey
}