Skip to content

Commit

Permalink
Agreement docs: Eliminate redundant nested peer_public_key in example.
Browse files Browse the repository at this point in the history
  • Loading branch information
briansmith committed Oct 26, 2023
1 parent 61ad435 commit c7d949c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/agreement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@
//! // message.
//! let my_public_key = my_private_key.compute_public_key()?;
//!
//! let peer_public_key = {
//! let peer_public_key_bytes = {
//! // In a real application, the peer public key would be parsed out of a
//! // protocol message. Here we just generate one.
//! let peer_public_key = {
//! let peer_private_key =
//! agreement::EphemeralPrivateKey::generate(&agreement::X25519, &rng)?;
//! peer_private_key.compute_public_key()?
//! };
//!
//! agreement::UnparsedPublicKey::new(&agreement::X25519, peer_public_key)
//! let peer_private_key =
//! agreement::EphemeralPrivateKey::generate(&agreement::X25519, &rng)?;
//! peer_private_key.compute_public_key()?
//! };
//!
//! let peer_public_key = agreement::UnparsedPublicKey::new(
//! &agreement::X25519,
//! peer_public_key_bytes);
//!
//! agreement::agree_ephemeral(
//! my_private_key,
//! &peer_public_key,
Expand Down

0 comments on commit c7d949c

Please sign in to comment.