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

Method SharedKey

key_schedule.go:193–199  ·  view source on GitHub ↗
(peerPublicKey []byte)

Source from the content-addressed store, hash-verified

191}
192
193func (p *x25519Parameters) SharedKey(peerPublicKey []byte) []byte {
194 sharedKey, err := curve25519.X25519(p.privateKey, peerPublicKey)
195 if err != nil {
196 return nil
197 }
198 return sharedKey
199}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected