From 73245554f9159afa2c0092f4170a02a91e0858ef Mon Sep 17 00:00:00 2001 From: qmuntal Date: Fri, 29 Sep 2023 14:39:13 +0200 Subject: [PATCH] add more docs --- cng/hkdf.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cng/hkdf.go b/cng/hkdf.go index f3dbb06..8467f3e 100644 --- a/cng/hkdf.go +++ b/cng/hkdf.go @@ -37,8 +37,11 @@ type hkdf struct { info []byte hashLen int - buf []byte - n int + n int // count of bytes requested from Read + // buf contains the derived data. + // len(buf) can be larger than n, as Read may derive + // more data than requested and cache it in buf. + buf []byte } func (c *hkdf) finalize() {