MCPcopy
hub / github.com/gorilla/websocket / computeAcceptKey

Function computeAcceptKey

util.go:19–24  ·  view source on GitHub ↗
(challengeKey string)

Source from the content-addressed store, hash-verified

17var keyGUID = []byte("258EAFA5-E914-47DA-95CA-C5AB0DC85B11")
18
19func computeAcceptKey(challengeKey string) string {
20 h := sha1.New()
21 h.Write([]byte(challengeKey))
22 h.Write(keyGUID)
23 return base64.StdEncoding.EncodeToString(h.Sum(nil))
24}
25
26func generateChallengeKey() (string, error) {
27 p := make([]byte, 16)

Callers 3

UpgradeMethod · 0.85
DialContextMethod · 0.85

Calls 1

WriteMethod · 0.45

Tested by 1