]> Cypherpunks repositories - gostls13.git/commit
crypto/subtle: panic if slices of different lengths are passed to ConstantTimeCompare.
authorAdam Langley <agl@golang.org>
Wed, 12 Feb 2014 16:58:48 +0000 (11:58 -0500)
committerAdam Langley <agl@golang.org>
Wed, 12 Feb 2014 16:58:48 +0000 (11:58 -0500)
commit384f4380e8a4fee35ac5ba8449b9fd5cf0865069
tree53c86c6cf0ba4017be713393cd86d8e6d13c960a
parent6b29f7bfbe9ca985ce2419285f0b56b5428e1ffe
crypto/subtle: panic if slices of different lengths are passed to ConstantTimeCompare.

ConstantTimeCompare has always been documented to take equal length
slices but perhaps this is too subtle, even for 'subtle'.

Fixes #7304.

LGTM=hanwen, bradfitz
R=golang-codereviews, hanwen, bradfitz
CC=golang-codereviews
https://golang.org/cl/62190043
src/pkg/crypto/subtle/constant_time.go