diff options
author | Dominik Honnef <dominikh@fork-bomb.org> | 2014-11-20 18:05:54 +0300 |
---|---|---|
committer | Dominik Honnef <dominikh@fork-bomb.org> | 2014-11-20 18:05:54 +0300 |
commit | 0ff019e2d61cc28e13bb9376ff503ceeba935239 (patch) | |
tree | fe3fb88a93b0321f038454a38ecf9ec2451918b3 | |
parent | 1b0c7f6e9ab3d7f500fd7d50c7ad835ff428139b (diff) |
say that we create a key of a certain length, not strength
-rw-r--r-- | securecookie.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/securecookie.go b/securecookie.go index 74b8acc..6b70268 100644 --- a/securecookie.go +++ b/securecookie.go @@ -340,9 +340,9 @@ func decode(value []byte) ([]byte, error) { // Helpers -------------------------------------------------------------------- -// GenerateRandomKey creates a random key with the given strength. -func GenerateRandomKey(strength int) []byte { - k := make([]byte, strength) +// GenerateRandomKey creates a random key with the given length in bytes. +func GenerateRandomKey(length int) []byte { + k := make([]byte, length) if _, err := io.ReadFull(rand.Reader, k); err != nil { return nil } |