]> Cypherpunks repositories - gostls13.git/commit
crypto: add package.
authorAdam Langley <agl@golang.org>
Tue, 1 Feb 2011 16:02:48 +0000 (11:02 -0500)
committerAdam Langley <agl@golang.org>
Tue, 1 Feb 2011 16:02:48 +0000 (11:02 -0500)
commite308d5597327cdc76872a7ccfd8a79b8a4b71232
tree0ae666a78f884e1e3a628ee06d43a0d672d3d254
parent400ea843c69350275474b607aa8b45c1cc403d81
crypto: add package.

The crypto package is added as a common place to store identifiers for
hash functions. At the moment, the rsa package has an enumeration of
hash functions and knowledge of their digest lengths. This is an
unfortunate coupling and other high level crypto packages tend to need
to duplicate this enumeration and knowledge (i.e. openpgp).

crypto pulls this code out into a common location.

It would also make sense to add similar support for ciphers to crypto,
but the problem there isn't as acute that isn't done in this change.

R=bradfitzgo, r, rsc
CC=golang-dev
https://golang.org/cl/4080046
16 files changed:
src/pkg/Makefile
src/pkg/crypto/Makefile [new file with mode: 0644]
src/pkg/crypto/crypto.go [new file with mode: 0644]
src/pkg/crypto/md4/md4.go
src/pkg/crypto/md5/md5.go
src/pkg/crypto/ocsp/ocsp.go
src/pkg/crypto/ripemd160/ripemd160.go
src/pkg/crypto/rsa/pkcs1v15.go
src/pkg/crypto/rsa/pkcs1v15_test.go
src/pkg/crypto/sha1/sha1.go
src/pkg/crypto/sha256/sha256.go
src/pkg/crypto/sha512/sha512.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/x509/x509.go