You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mask_safe.go 339B

123456789101112131415
  1. // 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. // +build appengine
  5. package websocket
  6. func maskBytes(key [4]byte, pos int, b []byte) int {
  7. for i := range b {
  8. b[i] ^= key[pos&3]
  9. pos++
  10. }
  11. return pos & 3
  12. }