dalek-cryptography / x25519-dalek

X25519 elliptic curve Diffie-Hellman key exchange in pure-Rust, using curve25519-dalek.
BSD 3-Clause "New" or "Revised" License
328 stars 133 forks source link

Add .to_bytes() to PublicKey, SharedSecret #43

Closed peat closed 4 years ago

peat commented 5 years ago

Added so that x25519_dalek::PublicKey has the same as_bytes/to_bytes fns as ed25519_dalek::PublicKey

Also added .to_bytes() to SharedSecret for consistency.

peat commented 5 years ago

The CI failure looks like an issue with trying to get assets for the Rust beta build, not failing tests. 🤔

error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-beta.toml.sha256' to '/home/travis/.rustup/tmp/o4an6qqt3qa04cun_file' info: caused by: failed to make network request info: caused by: https://static.rust-lang.org/dist/channel-rust-beta.toml.sha256: timed out The command "curl -sSf https://sh.rustup.rs | sh -s -- --default-toolchain=$TRAVIS_RUST_VERSION -y" failed and exited with 1 during .