15 lines
214 B
Go
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
|
|
}
|