Skip to content

Commit

Permalink
Lint circlehash64_test.go
Browse files Browse the repository at this point in the history
Rename sha512 to h inside a function to avoid shadowing imported package name (does not affect results).
  • Loading branch information
fxamacker authored Aug 4, 2024
1 parent 6644ae5 commit 32f4897
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions circlehash64_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ func TestCircleHash64NonUniformBitPatternInputs(t *testing.T) {
// digests using input of repeated byte values (0x00 to 0xFF).
// Input sizes range from 1 to 256 bytes.
func checksumUniformBitPatternInputs(t *testing.T, seed uint64) []byte {
sha512 := sha512.New()
h := sha512.New()

// Check 65536 digests on uniform byte fills (0x00-0xFF) of varying lengths
for pattern := 0; pattern <= 255; pattern++ {
Expand All @@ -311,11 +311,11 @@ func checksumUniformBitPatternInputs(t *testing.T, seed uint64) []byte {
binary.LittleEndian.PutUint64(b, digest)

// Feed CircleHash64 result into SHA-512.
sha512.Write(b)
h.Write(b)
}
}

return sha512.Sum(nil)
return h.Sum(nil)
}

// checksumVaryingStartPos updates cryptoHash512 with
Expand Down

0 comments on commit 32f4897

Please sign in to comment.