blob: 2aac060e52e7093d2dce5051d639a31560f6c4e8 [file] [log] [blame]
khenaidooab1f7bd2019-11-14 14:00:27 -05001// Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. Use of
2// this source code is governed by a BSD-style license that can be found in the
3// LICENSE file.
4
5// +build appengine
6
7package websocket
8
9func maskBytes(key [4]byte, pos int, b []byte) int {
10 for i := range b {
11 b[i] ^= key[pos&3]
12 pos++
13 }
14 return pos & 3
15}