Documentation ¶
Index ¶
- func CalculateModelMultihash(value interface{}, alg uint) (string, error)
- func ComputeMultihash(multihashCode uint, bytes []byte) ([]byte, error)
- func GetHash(hash crypto.Hash, data []byte) ([]byte, error)
- func GetHashFromMultihash(multihashCode uint) (h crypto.Hash, err error)
- func GetMultihash(encodedMultihash string) (*multihash.DecodedMultihash, error)
- func GetMultihashCode(encodedMultihash string) (uint64, error)
- func IsComputedUsingMultihashAlgorithms(encodedMultihash string, codes []uint) bool
- func IsSupportedMultihash(encodedMultihash string) bool
- func IsValidModelMultihash(model interface{}, modelMultihash string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateModelMultihash ¶
CalculateModelMultihash calculates model multihash.
func ComputeMultihash ¶
ComputeMultihash will compute the hash for the supplied bytes using multihash code.
func GetHashFromMultihash ¶
GetHashFromMultihash will return hash based on specified multihash code.
func GetMultihash ¶ added in v0.6.0
GetMultihash returns decoded multihash from encoded multihash.
func GetMultihashCode ¶
GetMultihashCode returns multihash code from encoded multihash.
func IsComputedUsingMultihashAlgorithms ¶ added in v0.6.0
IsComputedUsingMultihashAlgorithms checks to see if the given encoded hash has been hashed using one of supplied code.
func IsSupportedMultihash ¶
IsSupportedMultihash checks to see if the given encoded hash has been hashed using valid multihash code.
func IsValidModelMultihash ¶
IsValidModelMultihash compares model with provided model multihash.
Types ¶
This section is empty.