]> Cypherpunks.ru repositories - gostls13.git/commit
crypto/hmac: panic if reusing hash.Hash values
authorKatie Hockman <katie@golang.org>
Tue, 13 Oct 2020 20:33:46 +0000 (16:33 -0400)
committerKatie Hockman <katie@golang.org>
Mon, 19 Oct 2020 15:00:02 +0000 (15:00 +0000)
commit2a206c7fcc91854a0ab78fe5799bda38dd330b11
tree34c216ecba0171306bba04ca4ee644c40e321523
parent19f6422e005ed3f4b1a9f6850d382519673a3c87
crypto/hmac: panic if reusing hash.Hash values

Also put Reset in the correct place for the other
benchmarks.

name           old time/op    new time/op    delta
NewWriteSum-8    1.01µs ± 0%    1.01µs ± 1%   ~     (p=0.945 n=9+9)

name           old speed      new speed      delta
NewWriteSum-8  31.7MB/s ± 0%  31.6MB/s ± 1%   ~     (p=0.948 n=9+9)

name           old alloc/op   new alloc/op   delta
NewWriteSum-8      544B ± 0%      544B ± 0%   ~     (all equal)

name           old allocs/op  new allocs/op  delta
NewWriteSum-8      7.00 ± 0%      7.00 ± 0%   ~     (all equal)

Fixes #41089

Change-Id: I3dae660adbe4993963130bf3c2636bd53899164b
Reviewed-on: https://go-review.googlesource.com/c/go/+/261960
Trust: Katie Hockman <katie@golang.org>
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
doc/go1.16.html
src/crypto/hmac/hmac.go
src/crypto/hmac/hmac_test.go