Documentation ¶
Index ¶
- func LoadJson(t *testing.T, path string, v any)
- func NewReaderHashSnarkFromFile(api frontend.API, h snarkHash.FieldHasher, path string) snarkHash.FieldHasher
- func PrettyPrintHashes(in string, out io.Writer)
- func PrettyPrintHashesToFile(in, out string)
- func RandIntN(n int) int
- func RandIntSliceN(length, n int) []int
- func SlicesEqual[T any](expected, actual []T) error
- type FakeTestingT
- type ReaderHash
- type ReaderHashSnark
- type WriterHash
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewReaderHashSnarkFromFile ¶
func NewReaderHashSnarkFromFile(api frontend.API, h snarkHash.FieldHasher, path string) snarkHash.FieldHasher
func PrettyPrintHashes ¶
PrettyPrintHashes reads a file of hashes and prints them in a human-readable format. if out is nil, it will print to os.Stdout
func PrettyPrintHashesToFile ¶
func PrettyPrintHashesToFile(in, out string)
func RandIntSliceN ¶
func SlicesEqual ¶
Types ¶
type FakeTestingT ¶
type FakeTestingT struct{}
func (FakeTestingT) Errorf ¶
func (FakeTestingT) Errorf(format string, args ...interface{})
func (FakeTestingT) FailNow ¶
func (FakeTestingT) FailNow()
type ReaderHash ¶
type ReaderHash struct {
// contains filtered or unexported fields
}
ReaderHash is a wrapper around a hash.Hash that matches all writes with its input stream.
func NewReaderHashFromFile ¶
func NewReaderHashFromFile(h hash.Hash, path string) *ReaderHash
func (*ReaderHash) BlockSize ¶
func (r *ReaderHash) BlockSize() int
func (*ReaderHash) CloseFile ¶
func (r *ReaderHash) CloseFile()
func (*ReaderHash) Reset ¶
func (r *ReaderHash) Reset()
func (*ReaderHash) Size ¶
func (r *ReaderHash) Size() int
func (*ReaderHash) Sum ¶
func (r *ReaderHash) Sum(b []byte) []byte
type ReaderHashSnark ¶
type ReaderHashSnark struct {
// contains filtered or unexported fields
}
ReaderHashSnark is a wrapper around a FieldHasher that matches all writes with its input stream.
func (*ReaderHashSnark) CloseFile ¶
func (r *ReaderHashSnark) CloseFile()
func (*ReaderHashSnark) Reset ¶
func (r *ReaderHashSnark) Reset()
func (*ReaderHashSnark) Sum ¶
func (r *ReaderHashSnark) Sum() frontend.Variable
func (*ReaderHashSnark) Write ¶
func (r *ReaderHashSnark) Write(data ...frontend.Variable)
type WriterHash ¶
type WriterHash struct {
// contains filtered or unexported fields
}
WriterHash is a wrapper around a hash.Hash that duplicates all writes.
func NewWriterHashToFile ¶
func NewWriterHashToFile(h hash.Hash, path string) *WriterHash
func (*WriterHash) BlockSize ¶
func (w *WriterHash) BlockSize() int
func (*WriterHash) CloseFile ¶
func (w *WriterHash) CloseFile()
func (*WriterHash) Reset ¶
func (w *WriterHash) Reset()
func (*WriterHash) Size ¶
func (w *WriterHash) Size() int
func (*WriterHash) Sum ¶
func (w *WriterHash) Sum(b []byte) []byte
Click to show internal directories.
Click to hide internal directories.