O'Reilly logo
  • Ivan Zderadicka thinks this is interesting:

let res = agreement::agree_ephemeral(server_private_key,
&agreement::X25519,
peer_public_key,
ring::error::Unspecified,
|key_material| {
let mut key = Vec::new();
key.extend_from_slice(key_material);
Ok(key)
});

From

Cover of Network Programming with Rust

Note

dtto