sha256

package
v0.0.0-...-05508b9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConstraintSystem

func NewConstraintSystem() (constraint.ConstraintSystem, error)

NewConstraintSystem return the compiled ConstraintSystem implementing a pre image check

Types

type SHA256Circuit

type SHA256Circuit struct {
	// struct tag on a variable is optional
	// default uses variable name and secret visibility.
	PreImage frontend.Variable
	Hash     frontend.Variable `gnark:",public"`
}

Circuit defines a pre-image knowledge proof SHA256(secret preImage) = public hash

func (*SHA256Circuit) Define

func (circuit *SHA256Circuit) Define(api frontend.API) error

Define declares the circuit's constraints Hash = SHA256(PreImage)

Jump to

Keyboard shortcuts

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