| 1 | //go:build go1.21 |
| 2 | |
| 3 | // This package has no purpose except to perform registration of multihashes. |
| 4 | // |
| 5 | // It is meant to be used as a side-effecting import, e.g. |
| 6 | // |
| 7 | // import ( |
| 8 | // _ "github.com/multiformats/go-multihash/register/miniosha256" |
| 9 | // ) |
| 10 | // |
| 11 | // This package registers alternative implementations for sha2-256, using |
| 12 | // the github.com/minio/sha256-simd library for go1.20 and bellow. Go 1.21 and |
| 13 | // later fallback to [github.com/multiformats/go-multihash/register/sha256]. |
| 14 | // |
| 15 | // Deprecated: please switch to [github.com/multiformats/go-multihash/register/sha256] |
| 16 | // as of go1.21 the go std has a SHANI implementation that is just as fast. See https://go.dev/issue/50543. |
| 17 | // This will be removed shortly after go1.22 is released. |
| 18 | package miniosha256scip-go gomod github.com/multiformats/go-multihash . `github.com/multiformats/go-multihash/register/miniosha256`/ |
| 19 | |
| 20 | import ( |
| 21 | _ "github.com/multiformats/go-multihash/register/sha256scip-go gomod github.com/multiformats/go-multihash . `github.com/multiformats/go-multihash/register/sha256`/" |
| 22 | ) |