Source File
multihash_blake3.go
Belonging Package
github.com/multiformats/go-multihash/register/blake3
/*This package has no purpose except to register the blake3 hash function.It is meant to be used as a side-effecting import, e.g.import (_ "github.com/multiformats/go-multihash/register/blake3")*/package blake3import (multihash)const DefaultSize = 32const MaxSize = 128func init() {multihash.RegisterVariableSize(multihash.BLAKE3, func( int) (hash.Hash, bool) {if == -1 {= DefaultSize} else if > MaxSize || <= 0 {return nil, false}:= blake3.New(, nil)return , true})}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |