Browse Source

rename

main
Jacob Jackson 3 years ago
parent
commit
39247e8a12
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      sha512/sha512.go
  2. +1
    -1
      sha512/sha_test.go

sha512/pysha512.go → sha512/sha512.go

@ -15,7 +15,7 @@ func _right_rotate(n [64]frontend.Variable, bits int) [64]frontend.Variable {
return result return result
} }
func PySha512(api frontend.API, in [] frontend.Variable) ([512] frontend.Variable) {
func Sha512(api frontend.API, in [] frontend.Variable) ([512] frontend.Variable) {
_not := func(x [64]frontend.Variable) [64]frontend.Variable { _not := func(x [64]frontend.Variable) [64]frontend.Variable {
return not(api, x) return not(api, x)
} }

+ 1
- 1
sha512/sha_test.go

@ -15,7 +15,7 @@ type Sha512Circuit struct {
} }
func (circuit *Sha512Circuit) Define(api frontend.API) error { func (circuit *Sha512Circuit) Define(api frontend.API) error {
res := PySha512(api, circuit.in)
res := Sha512(api, circuit.in)
if len(res) != 512 { panic("bad length") } if len(res) != 512 { panic("bad length") }
for i := 0; i < 512; i++ { for i := 0; i < 512; i++ {
api.AssertIsEqual(res[i], circuit.out[i]) api.AssertIsEqual(res[i], circuit.out[i])

Loading…
Cancel
Save