diff options
author | Yawning Angel <yawning@schwanenlied.me> | 2014-05-24 04:47:10 +0000 |
---|---|---|
committer | Yawning Angel <yawning@schwanenlied.me> | 2014-05-24 04:47:10 +0000 |
commit | b3f0f51775ae2e19c62c70e15f77ef991ad4bb49 (patch) | |
tree | 0a779fe20ffead1e8a87ba209ac566829c7ce93a /replay_filter.go | |
parent | e77ddddf4d10dbd3387c2e4714c287c546c70512 (diff) |
Move utils.go to csrand/csrand.go, and clean up the interface.
All of the obfs4 code except unit tests now uses the csrand wrapper
routines.
Diffstat (limited to 'replay_filter.go')
-rw-r--r-- | replay_filter.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/replay_filter.go b/replay_filter.go index 5e98b89..9556ef4 100644 --- a/replay_filter.go +++ b/replay_filter.go @@ -29,11 +29,12 @@ package obfs4 import ( "container/list" - "crypto/rand" "encoding/binary" "sync" "github.com/dchest/siphash" + + "github.com/yawning/obfs4/csrand" ) // maxFilterSize is the maximum capacity of the replay filter. The busiest @@ -63,7 +64,7 @@ type filterEntry struct { func newReplayFilter() (filter *replayFilter, err error) { // Initialize the SipHash-2-4 instance with a random key. var key [16]byte - _, err = rand.Read(key[:]) + err = csrand.Bytes(key[:]) if err != nil { return } |