]> Cypherpunks repositories - gostls13.git/commit
Add a []byte argument to hash.Hash to allow an allocation to be saved.
authorAdam Langley <agl@golang.org>
Thu, 1 Dec 2011 17:35:37 +0000 (12:35 -0500)
committerAdam Langley <agl@golang.org>
Thu, 1 Dec 2011 17:35:37 +0000 (12:35 -0500)
commitbac7bc55a6a8776f45144452a7236e34cdb09de6
tree4630e0bcc2dae65f64a944ee1cf63750dfb538a1
parent2308aefc845d16c44882cff5590903b74aab42bf
Add a []byte argument to hash.Hash to allow an allocation to be saved.

This is the result of running `gofix -r hashsum` over the tree, changing
the hash function implementations by hand and then fixing a couple of
instances where gofix didn't catch something.

The changed implementations are as simple as possible while still
working: I'm not trying to optimise in this CL.

R=rsc, cw, rogpeppe
CC=golang-dev
https://golang.org/cl/5448065
49 files changed:
src/cmd/cgo/main.go
src/cmd/gofix/typecheck.go
src/pkg/archive/tar/reader_test.go
src/pkg/crypto/ecdsa/ecdsa_test.go
src/pkg/crypto/hmac/hmac.go
src/pkg/crypto/hmac/hmac_test.go
src/pkg/crypto/md4/md4.go
src/pkg/crypto/md4/md4_test.go
src/pkg/crypto/md5/md5.go
src/pkg/crypto/md5/md5_test.go
src/pkg/crypto/ocsp/ocsp.go
src/pkg/crypto/openpgp/canonical_text.go
src/pkg/crypto/openpgp/canonical_text_test.go
src/pkg/crypto/openpgp/packet/private_key.go
src/pkg/crypto/openpgp/packet/public_key.go
src/pkg/crypto/openpgp/packet/signature.go
src/pkg/crypto/openpgp/packet/symmetrically_encrypted.go
src/pkg/crypto/openpgp/s2k/s2k.go
src/pkg/crypto/ripemd160/ripemd160.go
src/pkg/crypto/ripemd160/ripemd160_test.go
src/pkg/crypto/rsa/pkcs1v15_test.go
src/pkg/crypto/rsa/rsa.go
src/pkg/crypto/sha1/sha1.go
src/pkg/crypto/sha1/sha1_test.go
src/pkg/crypto/sha256/sha256.go
src/pkg/crypto/sha256/sha256_test.go
src/pkg/crypto/sha512/sha512.go
src/pkg/crypto/sha512/sha512_test.go
src/pkg/crypto/tls/cipher_suites.go
src/pkg/crypto/tls/handshake_client.go
src/pkg/crypto/tls/handshake_server.go
src/pkg/crypto/tls/key_agreement.go
src/pkg/crypto/tls/prf.go
src/pkg/crypto/x509/x509.go
src/pkg/exp/ssh/client.go
src/pkg/exp/ssh/client_auth_test.go
src/pkg/exp/ssh/server.go
src/pkg/exp/ssh/transport.go
src/pkg/hash/adler32/adler32.go
src/pkg/hash/crc32/crc32.go
src/pkg/hash/crc64/crc64.go
src/pkg/hash/fnv/fnv.go
src/pkg/hash/fnv/fnv_test.go
src/pkg/hash/hash.go
src/pkg/io/multi_test.go
src/pkg/patch/git.go
src/pkg/websocket/hixie.go
src/pkg/websocket/hybi.go
test/fixedbugs/bug257.go