Documentation ¶
Index ¶
Constants ¶
View Source
const (
ContentHash = multihash.BLAKE2B_MAX
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hash ¶
type Hash []byte
Hash is like multihash.Multihash but also supports serializing to json. It's methods are nil-value safe.
func FromB58String ¶
Create a new Hash from a b58 string. (This is shorthand for importing/using &Hash{multihash.FromB58String("xxx")}
func TestDummy ¶
TestDummy returns a blake2b hash based on `seed`. The same `seed` will always generate the same hash.
func (Hash) UnmarshalJSON ¶
UnmarshalJSON loads a base58 string representation of a hash and converts it to raw bytes.
type HashWriter ¶
type HashWriter struct {
// contains filtered or unexported fields
}
func NewHashWriter ¶
func NewHashWriter() *HashWriter
func (*HashWriter) Hash ¶
func (hw *HashWriter) Hash() Hash
Click to show internal directories.
Click to hide internal directories.