aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Honnef <dominikh@fork-bomb.org>2014-11-20 18:05:54 +0300
committerDominik Honnef <dominikh@fork-bomb.org>2014-11-20 18:05:54 +0300
commit0ff019e2d61cc28e13bb9376ff503ceeba935239 (patch)
treefe3fb88a93b0321f038454a38ecf9ec2451918b3
parent1b0c7f6e9ab3d7f500fd7d50c7ad835ff428139b (diff)
say that we create a key of a certain length, not strength
-rw-r--r--securecookie.go6
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
}