aboutsummaryrefslogtreecommitdiff
path: root/ssh/example_test.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2023-09-09 18:06:46 -0700
committerGopher Robot <gobot@golang.org>2023-09-10 18:25:15 +0000
commit3f0842a46434ea6f56bf6e684c2b83d90e9cff07 (patch)
tree8fe050a8c6dd303fd8cdfc140af062c25ae762f1 /ssh/example_test.go
parente90f1e17ee2ffe351a8295e8ae8b66afda2969c6 (diff)
downloadgo-x-crypto-3f0842a46434ea6f56bf6e684c2b83d90e9cff07.tar.xz
sha3: have ShakeHash extend hash.Hash
Package sha3 recommends the SHAKE functions for new uses, but this is currently somewhat inconvenient because ShakeHash does not implement hash.Hash. This is understandable, as SHAKE supports arbitrary-length outputs whereas hash.Hash only supports fixed-length outputs. But there's a natural fixed-length output to provide: the minimum output that still provides SHAKE's full-strength generic security. While here, tweak Sum so that its temporary buffer can be stack allocated. Also, tweak the panic message in Write so that the error text is more readily understandable to Go programmers without needing to be familiar with crypto jargon, and add a similar check in Sum. Change-Id: Icf037d3990a71de5630f8825606614443f8c5245 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/526937 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Adam Langley <agl@google.com> Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'ssh/example_test.go')
0 files changed, 0 insertions, 0 deletions