sha256.go 511 B

123456789101112131415161718192021
  1. // This package has no purpose except to perform registration of multihashes.
  2. //
  3. // It is meant to be used as a side-effecting import, e.g.
  4. //
  5. // import (
  6. // _ "github.com/multiformats/go-multihash/register/sha256"
  7. // )
  8. //
  9. // This package an implementation of sha256 using the go std, this is recomanded
  10. // if you are using go1.21 or above.
  11. package sha256
  12. import (
  13. "crypto/sha256"
  14. multihash "github.com/multiformats/go-multihash/core"
  15. )
  16. func init() {
  17. multihash.Register(multihash.SHA2_256, sha256.New)
  18. }