Documentation
¶
Index ¶
- Constants
- func SaltXOR(data, salt []byte) (result []byte)
- type Hash
- func (h Hash) Bytes() []byte
- func (h Hash) Empty() bool
- func (h Hash) Equal(hash Hash) bool
- func (h Hash) Marshal() ([]byte, error)
- func (h *Hash) MarshalTo(data []byte) (int, error)
- func (h Hash) ProtoMessage()
- func (h *Hash) Reset()
- func (h Hash) Size() int
- func (h Hash) String() string
- func (h *Hash) Unmarshal(data []byte) error
- func (h Hash) Validate(hashes []Hash) bool
- func (h Hash) Verify(data []byte) bool
- type HashesSlice
Constants ¶
View Source
const ErrWrongDataSize = internal.Error("wrong data size")
ErrWrongDataSize raised when wrong size of bytes is passed to unmarshal HH.
View Source
const HomomorphicHashSize = 64
HomomorphicHashSize contains size of HH.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Hash ¶
type Hash [HomomorphicHashSize]byte
Hash is implementation of HomomorphicHash.
func (*Hash) MarshalTo ¶
MarshalTo tries to marshal Hash into passed bytes and returns count of copied bytes.
func (Hash) ProtoMessage ¶
func (h Hash) ProtoMessage()
ProtoMessage method to satisfy proto.Message interface.
type HashesSlice ¶
type HashesSlice []Hash
HashesSlice is a collection that satisfies sort.Interface and can be sorted by the routines in sort package.
func (HashesSlice) Len ¶
func (hs HashesSlice) Len() int
-- HashesSlice -- an inner type to sort Objects Len is the number of elements in the collection.
func (HashesSlice) Less ¶
func (hs HashesSlice) Less(i, j int) bool
Less reports whether the element with index i should be sorted before the element with index j.
func (HashesSlice) Swap ¶
func (hs HashesSlice) Swap(i, j int)
Swap swaps the elements with indexes i and j.
Click to show internal directories.
Click to hide internal directories.