summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/gorilla/websocket/mask.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-05-17 16:51:25 -0400
committerGitHub <noreply@github.com>2017-05-17 16:51:25 -0400
commitd103ed6ca97ca5a2669f6cf5fe4b3d2a9c945f26 (patch)
treedbde13123c6add150448f7b75753ac022d862475 /vendor/github.com/gorilla/websocket/mask.go
parentcd23b8139a9463b67e3096744321f6f4eb0ca40a (diff)
downloadchat-d103ed6ca97ca5a2669f6cf5fe4b3d2a9c945f26.tar.gz
chat-d103ed6ca97ca5a2669f6cf5fe4b3d2a9c945f26.tar.bz2
chat-d103ed6ca97ca5a2669f6cf5fe4b3d2a9c945f26.zip
Upgrading server dependancies (#6431)
Diffstat (limited to 'vendor/github.com/gorilla/websocket/mask.go')
-rw-r--r--vendor/github.com/gorilla/websocket/mask.go12
1 files changed, 3 insertions, 9 deletions
diff --git a/vendor/github.com/gorilla/websocket/mask.go b/vendor/github.com/gorilla/websocket/mask.go
index 6758a2cb7..6a88bbc74 100644
--- a/vendor/github.com/gorilla/websocket/mask.go
+++ b/vendor/github.com/gorilla/websocket/mask.go
@@ -2,20 +2,14 @@
// this source code is governed by a BSD-style license that can be found in the
// LICENSE file.
+// +build !appengine
+
package websocket
-import (
- "math/rand"
- "unsafe"
-)
+import "unsafe"
const wordSize = int(unsafe.Sizeof(uintptr(0)))
-func newMaskKey() [4]byte {
- n := rand.Uint32()
- return [4]byte{byte(n), byte(n >> 8), byte(n >> 16), byte(n >> 24)}
-}
-
func maskBytes(key [4]byte, pos int, b []byte) int {
// Mask one byte at a time for small buffers.