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

Function basicMask

mask_test.go:14–20  ·  view source on GitHub ↗
(b []byte, key uint32)

Source from the content-addressed store, hash-verified

12)
13
14func basicMask(b []byte, key uint32) uint32 {
15 for i := range b {
16 b[i] ^= byte(key)
17 key = bits.RotateLeft32(key, -8)
18 }
19 return key
20}
21
22func basicMask2(b []byte, key uint32) uint32 {
23 keyb := binary.LittleEndian.AppendUint32(nil, key)

Callers 1

testMaskFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…