Skip to content

Commit

Permalink
fix credential Poseidon hashing
Browse files Browse the repository at this point in the history
  • Loading branch information
freigeistig committed Feb 28, 2024
1 parent 8ba802a commit 6eb0591
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/service/issuer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ func (is *Issuer) IssueVotingClaim(
return "", errors.Wrap(err, "failed to hash bytes")
}

credHashInput := make([]byte, 0)
credHashInput = append(credHashInput, 1)
credHashInput = append(credHashInput, big.NewInt(issuingAuthority).Bytes()...)
credHashInput = append(credHashInput, nullifierHash.Bytes()...)
credHashInput := make([]*big.Int, 0)
credHashInput = append(credHashInput, big.NewInt(1))
credHashInput = append(credHashInput, big.NewInt(issuingAuthority))
credHashInput = append(credHashInput, nullifierHash)

credentialHash, err := poseidon.HashBytes(credHashInput)
credentialHash, err := poseidon.Hash(credHashInput)
if err != nil {
return "", errors.Wrap(err, "failed to hash bytes")
}
Expand Down

0 comments on commit 6eb0591

Please sign in to comment.