Documentation ¶
Index ¶
- Constants
- func NewHash() hash.Hash
- type Digest
- func (_ *Digest) CanMarshalMsg(z interface{}) bool
- func (_ *Digest) CanUnmarshalMsg(z interface{}) bool
- func (d Digest) IsZero() bool
- func (z *Digest) MarshalMsg(b []byte) (o []byte)
- func (z *Digest) MsgIsZero() bool
- func (z *Digest) Msgsize() (s int)
- func (d Digest) String() string
- func (d Digest) ToSlice() []byte
- func (d Digest) TrimUint64() uint64
- func (z *Digest) UnmarshalMsg(bts []byte) (o []byte, err error)
Constants ¶
View Source
const DigestSize = sha512.Size256
DigestSize is the number of bytes in the preferred hash Digest used here.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Digest ¶
type Digest [DigestSize]byte
Digest represents a 32-byte value holding the 256-bit Hash digest.
func DigestFromString ¶
DigestFromString converts a string to a Digest
func (*Digest) CanMarshalMsg ¶
func (*Digest) CanUnmarshalMsg ¶
func (*Digest) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (*Digest) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (Digest) TrimUint64 ¶
TrimUint64 returns the top 64 bits of the digest and converts to uint64
Click to show internal directories.
Click to hide internal directories.