Documentation ¶
Overview ¶
Package valuehash provides valuehashes.
Index ¶
Constants ¶
View Source
const ( SHA256Size int = 32 SHA512Size int = 64 )
Variables ¶
This section is empty.
Functions ¶
func NewHashFromBytes ¶
func RandomSHA256 ¶
func RandomSHA256WithPrefix ¶
RandomSHA256WithPrefix generate random hash with string-based prefix. To decode, it's structure is, - <8: length of bytes prefix><8: length of random hash><32: random hash><bytes prefix>
* 52 is max valid length of prefix
func RandomSHA512 ¶
func RandomSHA512WithPrefix ¶
RandomSHA512WithPrefix generate random hash with string-based prefix. To decode, it's structure is, - <8: length of bytes prefix><8: length of random hash><64: random hash><bytes prefix>
* 20 is max valid length of prefix
Types ¶
type Bytes ¶
type Bytes []byte
func NewBytesFromString ¶
func (Bytes) MarshalText ¶
func (*Bytes) UnmarshalText ¶
type HashDecoder ¶
type HashDecoder struct {
// contains filtered or unexported fields
}
func (HashDecoder) Hash ¶
func (d HashDecoder) Hash() util.Hash
func (*HashDecoder) UnmarshalText ¶
func (d *HashDecoder) UnmarshalText(b []byte) error
Click to show internal directories.
Click to hide internal directories.