Stuff
This commit is contained in:
parent
c1840caa36
commit
c453ea7231
|
@ -0,0 +1,13 @@
|
|||
package gowgpkg
|
||||
|
||||
import "golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
||||
|
||||
func CreatePrivateKey() (publicKey, privateKey string, err error) {
|
||||
r, err := wgtypes.GeneratePrivateKey()
|
||||
if err != nil {
|
||||
return "", "", err
|
||||
}
|
||||
privateKey = r.String()
|
||||
publicKey = r.PublicKey().String()
|
||||
return
|
||||
}
|
Loading…
Reference in New Issue