Ver Fonte

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 há 8 anos atrás
pai
commit
365904b0f3
1 ficheiros alterados com 1 adições e 1 exclusões
  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
 	}