aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
}