diff options
Diffstat (limited to 'vendor/github.com/gorilla/websocket/mask.go')
-rw-r--r-- | vendor/github.com/gorilla/websocket/mask.go | 12 |
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. |