Documentation
¶
Index ¶
- Constants
- Variables
- type Hash256
- func DoubleHash(data []byte) Hash256
- func DoubleHashByWriterTo(w io.WriterTo) Hash256
- func Hash(data []byte) Hash256
- func MustParseHash(str string) Hash256
- func MustParseHex(str string) Hash256
- func ParseHash(str string) (Hash256, error)
- func ParseHex(str string) (Hash256, error)
- func TwoHash(h1 Hash256, h2 Hash256) Hash256
Constants ¶
View Source
const Hash256Size = 32
Hash256Size is 32 bytes
Variables ¶
View Source
var ( ErrInvalidHashSize = errors.New("invalid hash size") ErrInvalidHashFormat = errors.New("invalid hash format") )
hash256 errors
Functions ¶
This section is empty.
Types ¶
type Hash256 ¶
type Hash256 [Hash256Size]byte
Hash256 is the [Hash256Size]byte with methods
func DoubleHash ¶
DoubleHash returns the result of Hash(Hash(data))
func DoubleHashByWriterTo ¶
DoubleHashByWriterTo returns the result of Hash(io.Writer)
func (Hash256) MarshalJSON ¶
MarshalJSON is a marshaler function
func (*Hash256) UnmarshalJSON ¶
UnmarshalJSON is a unmarshaler function
Click to show internal directories.
Click to hide internal directories.