MCPcopy Create free account
hub / github.com/PasarGuard/node / mustGeneratePrivateKey

Function mustGeneratePrivateKey

backend/wireguard/integration_e2e_test.go:225–232  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

223}
224
225func mustGeneratePrivateKey(t *testing.T) string {
226 t.Helper()
227 privateKey, _, err := GenerateKeyPair()
228 if err != nil {
229 t.Fatalf("failed to generate private key: %v", err)
230 }
231 return privateKey
232}
233
234func buildWGUser(email, publicKey, peerIP, iface string, includeInterface bool) *common.User {
235 return buildWGUserWithPeerIPs(email, publicKey, []string{peerIP}, iface, includeInterface)

Calls 1

GenerateKeyPairFunction · 0.85

Tested by

no test coverage detected