Skip to content

Commit

Permalink
chore: add hash value in generate secp256k1 example
Browse files Browse the repository at this point in the history
  • Loading branch information
mariocao committed Jul 24, 2019
1 parent 2066ab9 commit efa39aa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/generate_secp256k1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,15 @@ fn main() {
let public_key = vrf.derive_public_key(&secret_key).unwrap();
// VRF proof
let pi = vrf.prove(&secret_key, &message).unwrap();
// VRF proof to hash
let hash = vrf.proof_to_hash(&pi).unwrap();

json!({
"priv": val.get("k"),
"pub": to_hex_string(public_key),
"message": to_hex_string(message.to_vec()),
"pi": to_hex_string(pi)
"pi": to_hex_string(pi),
"hash": to_hex_string(hash)
})
})
.collect();
Expand Down

0 comments on commit efa39aa

Please sign in to comment.