Skip to content

machinefi/go-iden3-crypto

 
 

Repository files navigation

go-iden3-crypto

fork from go-iden3-crypto

example

	hexString := "470Eb48290776c370ffAd6224364a604AedfE7B9"
	bigInt := new(big.Int)
	bigInt.SetString(hexString, 16)
	b1 := big.NewInt(1)
	b2 := bigInt
	b3 := big.NewInt(2)
	b4 := big.NewInt(3)
	b5 := big.NewInt(4)
	
	h, _ := poseidon.HashWithWidth([]*big.Int{b1, b2, b3, b4, b5}, 5) 
	fmt.Println(fmt.Sprintf("%064s", h.Text(16)))

About

Go implementation of some cryptographic primitives (that fit inside the SNARK field) and compatible with circomlib

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 98.7%
  • Assembly 1.3%