http.websocketUnmask(buffer, mask): void
Attributes
buffer:
Buffer | TypedArray | DataViewThe data to unmask, in place.
mask:
Buffer | TypedArray | DataViewThe 4-byte masking key.
XORs every byte of buffer with mask, repeated, in place: byte i is XORed
with byte i % 4 of mask. This is equivalent to
http.websocketMask(buffer, mask, buffer, 0, buffer.byteLength), and is
typically used to unmask a received WebSocket frame payload
(RFC 6455, Section 5.3). See http.websocketMask() for an example.
An error is thrown, and nothing is written, if mask is not exactly 4 bytes
long or if buffer is backed by an immutable ArrayBuffer.