MCPcopy Create free account
hub / github.com/XTLS/Go / publicKey

Function publicKey

generate_cert.go:40–51  ·  view source on GitHub ↗
(priv any)

Source from the content-addressed store, hash-verified

38)
39
40func publicKey(priv any) any {
41 switch k := priv.(type) {
42 case *rsa.PrivateKey:
43 return &k.PublicKey
44 case *ecdsa.PrivateKey:
45 return &k.PublicKey
46 case ed25519.PrivateKey:
47 return k.Public().(ed25519.PublicKey)
48 default:
49 return nil
50 }
51}
52
53func main() {
54 flag.Parse()

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…