WebSocketMaskingKey

public struct WebSocketMaskingKey

A single 4-byte websocket masking key.

WebSockets uses a masking key to prevent malicious users from injecting predictable binary sequences into websocket data streams. This structure provides a more convenient method of interacting with a masking key than simply by passing around a four-tuple.

  • Declaration

    Swift

    public static func == (lhs: WebSocketMaskingKey, rhs: WebSocketMaskingKey) -> Bool