aboutsummaryrefslogtreecommitdiff
path: root/lib/bytes/random.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bytes/random.go')
-rw-r--r--lib/bytes/random.go22
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/bytes/random.go b/lib/bytes/random.go
deleted file mode 100644
index 73945788..00000000
--- a/lib/bytes/random.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2018, Shulhan <ms@kilabit.info>. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package bytes
-
-import (
- "math/rand"
-)
-
-//
-// Random generate random sequence of value from seed with fixed length.
-//
-// This function assume that random generator has been seeded.
-//
-func Random(seed []byte, n int) []byte {
- b := make([]byte, n)
- for x := 0; x < n; x++ {
- b[x] = seed[rand.Intn(len(seed))]
- }
- return b
-}