test_vector_utils

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MapCache = make(map[string]*ElementMap)

Functions

func ElementSliceSliceToInterfaceSliceSlice

func ElementSliceSliceToInterfaceSliceSlice(x interface{}) [][]interface{}

func ElementSliceToInterfaceSlice

func ElementSliceToInterfaceSlice(x interface{}) []interface{}

func ElementToInterface

func ElementToInterface(x *fr.Element) interface{}

func NewMessageCounter

func NewMessageCounter(startState, step int) hash.Hash

func NewMessageCounterGenerator

func NewMessageCounterGenerator(startState, step int) func() hash.Hash

func PolynomialSliceEquals

func PolynomialSliceEquals(a []polynomial.Polynomial, b []polynomial.Polynomial) error

func SetElement

func SetElement(z *fr.Element, value interface{}) (*fr.Element, error)

func SliceEquals

func SliceEquals(a []fr.Element, b []fr.Element) error

func SliceSliceEquals

func SliceSliceEquals(a [][]fr.Element, b [][]fr.Element) error

func SliceToElementSlice

func SliceToElementSlice[T any](slice []T) ([]fr.Element, error)

func ToElement

func ToElement(i int64) *fr.Element

Types

type ElementMap

type ElementMap []*ElementTriplet

func CreateElementMap

func CreateElementMap(rawMap map[string]interface{}) (ElementMap, error)

func ElementMapFromFile

func ElementMapFromFile(path string) (*ElementMap, error)

func (*ElementMap) FindPair

func (m *ElementMap) FindPair(x *fr.Element, y *fr.Element) (fr.Element, error)

func (*ElementMap) UnusedEntries

func (m *ElementMap) UnusedEntries() []interface{}

type ElementTriplet

type ElementTriplet struct {
	// contains filtered or unexported fields
}

func (*ElementTriplet) CmpKey

func (t *ElementTriplet) CmpKey(o *ElementTriplet) int

type ListHash

type ListHash []fr.Element

func (*ListHash) BlockSize

func (h *ListHash) BlockSize() int

func (*ListHash) Reset

func (h *ListHash) Reset()

func (*ListHash) Size

func (h *ListHash) Size() int

func (*ListHash) Sum

func (h *ListHash) Sum(b []byte) []byte

func (*ListHash) Write

func (h *ListHash) Write(p []byte) (n int, err error)

type MapHash

type MapHash struct {
	Map *ElementMap
	// contains filtered or unexported fields
}

func (*MapHash) BlockSize

func (m *MapHash) BlockSize() int

func (*MapHash) Reset

func (m *MapHash) Reset()

func (*MapHash) Size

func (m *MapHash) Size() int

func (*MapHash) Sum

func (m *MapHash) Sum(b []byte) []byte

func (*MapHash) Write

func (m *MapHash) Write(p []byte) (n int, err error)

type MessageCounter

type MessageCounter struct {
	// contains filtered or unexported fields
}

func (*MessageCounter) BlockSize

func (m *MessageCounter) BlockSize() int

func (*MessageCounter) Reset

func (m *MessageCounter) Reset()

func (*MessageCounter) Size

func (m *MessageCounter) Size() int

func (*MessageCounter) Sum

func (m *MessageCounter) Sum(b []byte) []byte

func (*MessageCounter) Write

func (m *MessageCounter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL