Skip to content

Commit

Permalink
Doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Oct 11, 2022
1 parent da3e2b3 commit f5d257b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

```toml
[dependencies]
ed25519-compact = "0.1"
ed25519-compact = "2"
```

Example code:
Expand Down Expand Up @@ -61,18 +61,18 @@ Messages can also be supplied as multiple parts (streaming API) in order to hand
/// Creates a new key pair.
let kp = KeyPair::generate();

/// Create a state for an incremental signer.
/// Creates a state for an incremental signer.
let mut st = kp.sk.sign_incremental(Noise::default());

/// Feed the message as any number of chunks, and sign the concatenation.
/// Feeds the message as any number of chunks, and sign the concatenation.
st.absorb("mes");
st.absorb("sage");
let signature = st.sign();

/// Create a state for an incremental verifier.
/// Creates a state for an incremental verifier.
let mut st = kp.pk.verify_incremental(&signature)?;

/// Feed the message as any number of chunks, and verify the concatenation.
/// Feeds the message as any number of chunks, and verify the concatenation.
st.absorb("mess");
st.absorb("age");
st.verify()?;
Expand Down

0 comments on commit f5d257b

Please sign in to comment.