Przeglądaj źródła

Add prng.Read helper function

Rod Hynes 6 lat temu
rodzic
commit
7fa202e909
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      psiphon/common/prng/prng.go

+ 4 - 0
psiphon/common/prng/prng.go

@@ -326,6 +326,10 @@ func (p *PRNG) Base64String(byteLength int) string {
 
 var p *PRNG
 
+func Read(b []byte) (int, error) {
+	return p.Read(b)
+}
+
 func Int63() int64 {
 	return p.Int63()
 }