Function flipMsb

  • Flips the most significant bits of each byte in a sequence of bytes. (Values 0 and 128 are not flipped.)
    Used when encrypting and decrypting packets.

    Example

    {0, 1, 127, 128, 129, 254, 255} → {0, 129, 255, 128, 1, 126, 127}
    

    Remarks

    This is an in-place operation.

    Parameters

    • data: Uint8Array

      the data to flip most significant bits on

    Returns void

Generated using TypeDoc