]> Cypherpunks repositories - gostls13.git/commit
crypto/hmac: Deprecate hmac.NewMD5, hmac.NewSHA1 and hmac.NewSHA256
authorLuit van Drongelen <luitvd@gmail.com>
Thu, 19 Jan 2012 22:28:38 +0000 (17:28 -0500)
committerAdam Langley <agl@golang.org>
Thu, 19 Jan 2012 22:28:38 +0000 (17:28 -0500)
commit8d66a416cb4b84abeaeccaa69dda3783dda1b76a
treefe3325ec35eb2d6a7574240599f3d0ae8fbe9a01
parentee09a8cd9fee2f38fd100bd27451c4284f7e9d96
crypto/hmac: Deprecate hmac.NewMD5, hmac.NewSHA1 and hmac.NewSHA256

Remove NewMD5, NewSHA1 and NewSHA256 in favor of using New and
explicitly importing the used hash-function. This way when using, for
example, HMAC with RIPEMD there's no md5, sha1 and sha256 linked in
through the hmac package.

A gofix rule is included, and applied to the standard library (3 files
altered).

This change is the result of a discussion at
https://golang.org/cl/5550043/ to pull the discussion about
deprecating these functions out of that issue.

R=golang-dev, agl
CC=golang-dev, r, rsc
https://golang.org/cl/5556058
src/cmd/gofix/Makefile
src/cmd/gofix/hmacnew.go [new file with mode: 0644]
src/cmd/gofix/hmacnew_test.go [new file with mode: 0644]
src/pkg/crypto/hmac/hmac.go
src/pkg/crypto/tls/cipher_suites.go
src/pkg/exp/ssh/transport.go
src/pkg/net/smtp/auth.go