MCPcopy
hub / github.com/Terry-Mao/goim / computeAcceptKey

Function computeAcceptKey

pkg/websocket/server.go:51–56  ·  view source on GitHub ↗
(challengeKey string)

Source from the content-addressed store, hash-verified

49}
50
51func computeAcceptKey(challengeKey string) string {
52 h := sha1.New()
53 _, _ = h.Write([]byte(challengeKey))
54 _, _ = h.Write(keyGUID)
55 return base64.StdEncoding.EncodeToString(h.Sum(nil))
56}

Callers 1

UpgradeFunction · 0.85

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected