From 0ff019e2d61cc28e13bb9376ff503ceeba935239 Mon Sep 17 00:00:00 2001 From: Dominik Honnef Date: Thu, 20 Nov 2014 16:05:54 +0100 Subject: say that we create a key of a certain length, not strength --- securecookie.go | 6 +++--- 1 file 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 } -- cgit v1.2.3