Skip to content

Commit

Permalink
extend main
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarak Ben Youssef committed Mar 14, 2024
1 parent 36aaa12 commit cba72e1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions cmd/consensus/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@ func main() {
pkBytes := pk.Encode()
pkCheck, _ := crypto.DecodePublicKey(crypto.BLSBLS12381, pkBytes)

if pk.Equals(pkCheck) {
if !pk.Equals(pkCheck) {
fmt.Println("noooo")
return
}
hasher := crypto.NewExpandMsgXOFKMAC128("test tag")
s, _ := sk.Sign(seed, hasher)
result, _ := pk.Verify(s, seed, hasher)

if result {
fmt.Println("works!!")
} else {
fmt.Println("noooo")
fmt.Println("nooo")
}
}

0 comments on commit cba72e1

Please sign in to comment.