MCPcopy
hub / github.com/coder/websocket / secWebSocketAccept

Function secWebSocketAccept

accept.go:372–378  ·  view source on GitHub ↗
(secWebSocketKey string)

Source from the content-addressed store, hash-verified

370var keyGUID = []byte("258EAFA5-E914-47DA-95CA-C5AB0DC85B11")
371
372func secWebSocketAccept(secWebSocketKey string) string {
373 h := sha1.New()
374 h.Write([]byte(secWebSocketKey))
375 h.Write(keyGUID)
376
377 return base64.StdEncoding.EncodeToString(h.Sum(nil))
378}

Callers 2

verifyServerResponseFunction · 0.85
acceptFunction · 0.85

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…