aboutsummaryrefslogtreecommitdiff
path: root/keys.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-10-23 21:49:07 +0200
committerDimitri Sokolyuk <demon@dim13.org>2016-10-23 21:49:07 +0200
commit2f0eaa74062ac1323b2056081ca8c7f388b0bdcb (patch)
tree389bce61fb102ace82caa3b7a700c7cd79c11bac /keys.go
parent6e80b3fb8d5bfd948a46a9bf48730e460471af56 (diff)
Don't depend on len
Diffstat (limited to 'keys.go')
-rw-r--r--keys.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/keys.go b/keys.go
index bfa64b6..a84d663 100644
--- a/keys.go
+++ b/keys.go
@@ -36,5 +36,5 @@ type EncKey struct {
func (v *EncKey) Valid() bool {
sum := sha512.Sum512(v.SecKey[:])
- return bytes.Equal(sum[:len(v.Checksum)], v.Checksum[:])
+ return bytes.Equal(sum[:8], v.Checksum[:])
}