]> Cypherpunks repositories - gostls13.git/commit
crypto/hmac: Add HMAC-SHA224 and HMAC-SHA384/512
authorLuit van Drongelen <luitvd@gmail.com>
Wed, 18 Jan 2012 15:36:28 +0000 (10:36 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 18 Jan 2012 15:36:28 +0000 (10:36 -0500)
commita5263c7caa61eb9eedfd6c15e3c1f989d5490ef9
tree6f022e08432e934e686f2b3647da01b923dbfee2
parent18ee75ec88593d96796089038b93ed66596ae4d9
crypto/hmac: Add HMAC-SHA224 and HMAC-SHA384/512

First was, apart from adding tests, a single line of code (to add the
constructor function). Adding SHA512-based hashing to crypto/hmac
required minor rework of the package because of a previously hardcoded
block-size in it's implementation. Instead of using a hash.Hash
generator function the constructor function now uses a crypto.Hash
type, which was extended to expose information about block size.

The only standard library package impacted by the change is
crypto/tls, for which the fix is included in this patch. It might be
useful to extend gofix to include this API change too.

R=agl, r, rsc, r
CC=golang-dev
https://golang.org/cl/5550043
16 files changed:
src/pkg/crypto/hmac/hmac.go
src/pkg/crypto/hmac/hmac_test.go
src/pkg/crypto/md4/md4.go
src/pkg/crypto/md5/md5.go
src/pkg/crypto/openpgp/canonical_text.go
src/pkg/crypto/openpgp/canonical_text_test.go
src/pkg/crypto/ripemd160/ripemd160.go
src/pkg/crypto/sha1/sha1.go
src/pkg/crypto/sha256/sha256.go
src/pkg/crypto/sha512/sha512.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/hash.go