summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2020-09-06 22:18:39 -0400
committerrsiddharth <s@ricketyspace.net>2020-09-06 22:18:39 -0400
commitd421c201ea1b1503a17aa42a0f132f3f60826199 (patch)
tree76213685fd3d72f81ee41b7e6c1af138bc9d6ae2 /lib
parent37004a756479c0f8b27a232ca7cd7f96e5d8d084 (diff)
lib: remove genKey
* lib/hamming.go (genKey): Remove function.
Diffstat (limited to 'lib')
-rw-r--r--lib/hamming.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/hamming.go b/lib/hamming.go
index e53916c..0cfcf41 100644
--- a/lib/hamming.go
+++ b/lib/hamming.go
@@ -3,12 +3,6 @@
package lib
-import "math/rand"
-
-func init() {
- rand.Seed(42)
-}
-
func HammingDistance(a, b []byte) int {
if len(a) != len(b) {
return -1 // Fail.
@@ -53,11 +47,3 @@ func KeySizeWithMinDistance(keyMin, keyMax int, bs []byte) int {
}
return mk
}
-
-// Generates a key of size 'size' bytes.
-func genKey(size int) []byte {
- bs := make([]byte, size, size)
- rand.Read(bs)
-
- return bs
-}