From edb60b58324546ac7b4421958240b2d8eaa9e7e1 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Sun, 5 Jul 2015 14:01:56 -0700 Subject: [PATCH] helper/kdf: changing argument name for clarity --- helper/kdf/kdf.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helper/kdf/kdf.go b/helper/kdf/kdf.go index 442812aef3..30d78b907f 100644 --- a/helper/kdf/kdf.go +++ b/helper/kdf/kdf.go @@ -20,7 +20,7 @@ type PRF func([]byte, []byte) ([]byte, error) // CounterMode implements the counter mode KDF that uses a psuedo-random-function (PRF) // along with a counter to generate derived keys. The KDF takes a base key // a derivation context, and the requried number of output bits. -func CounterMode(prf PRF, prfLen uint32, base []byte, context []byte, bits uint32) ([]byte, error) { +func CounterMode(prf PRF, prfLen uint32, key []byte, context []byte, bits uint32) ([]byte, error) { // Ensure the PRF is byte aligned if prfLen%8 != 0 { return nil, fmt.Errorf("PRF must be byte aligned") @@ -50,7 +50,7 @@ func CounterMode(prf PRF, prfLen uint32, base []byte, context []byte, bits uint3 binary.BigEndian.PutUint32(input[:4], i) // Compute a more key material - part, err := prf(base, input) + part, err := prf(key, input) if err != nil { return nil, err }