Skip to content

Commit c90954c

Browse files
woatFiloSottile
authored andcommitted
nacl/auth: use Size instead of KeySize for Sum output
Fixes golang/go#41692 Change-Id: If6e885ca2e016dfecf534093c989356142ec7823 GitHub-Last-Rev: fe67c18f18ccfc766687b8db4bda92b9f7879a2b GitHub-Pull-Request: golang/crypto#154 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/258357 Reviewed-by: Filippo Valsorda <filippo@golang.org> Trust: Roland Shoemaker <roland@golang.org>
1 parent eb9a90e commit c90954c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: nacl/auth/auth.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const (
4040
func Sum(m []byte, key *[KeySize]byte) *[Size]byte {
4141
mac := hmac.New(sha512.New, key[:])
4242
mac.Write(m)
43-
out := new([KeySize]byte)
43+
out := new([Size]byte)
4444
copy(out[:], mac.Sum(nil)[:Size])
4545
return out
4646
}

0 commit comments

Comments
 (0)