From 98ff7ccb509ed290b2c1dc195f02391cacf95143 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Wed, 4 Jan 2017 10:56:36 +0700 Subject: [PATCH] use FNV1a hash for cached certificates fixes #383 --- crypto/cert_compression.go | 2 +- crypto/cert_compression_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/cert_compression.go b/crypto/cert_compression.go index 8fdb25793..35a54336e 100644 --- a/crypto/cert_compression.go +++ b/crypto/cert_compression.go @@ -150,7 +150,7 @@ func splitHashes(hashes []byte) ([]uint64, error) { } func hashCert(cert []byte) uint64 { - h := fnv.New64() + h := fnv.New64a() h.Write(cert) return h.Sum64() } diff --git a/crypto/cert_compression_test.go b/crypto/cert_compression_test.go index 2aa5584f6..d1d069984 100644 --- a/crypto/cert_compression_test.go +++ b/crypto/cert_compression_test.go @@ -13,7 +13,7 @@ import ( ) func byteHash(d []byte) []byte { - h := fnv.New64() + h := fnv.New64a() h.Write(d) s := h.Sum64() res := make([]byte, 8)