浏览代码

nacl/auth: use KeySize constant consistently.

Fixes golang/go#21788

Change-Id: I9310b438ce90cd3bba48295c829d44779c9f09c5
Reviewed-on: https://go-review.googlesource.com/79875
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Kevin Burke <kev@inburke.com>
Adam Langley 8 年之前
父节点
当前提交
365904b0f3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      nacl/auth/auth.go

+ 1 - 1
nacl/auth/auth.go

@@ -47,7 +47,7 @@ func Sum(m []byte, key *[KeySize]byte) *[Size]byte {
 
 // Verify checks that digest is a valid authenticator of message m under the
 // given secret key. Verify does not leak timing information.
-func Verify(digest []byte, m []byte, key *[32]byte) bool {
+func Verify(digest []byte, m []byte, key *[KeySize]byte) bool {
 	if len(digest) != Size {
 		return false
 	}