mirror of
https://github.com/saymrwulf/risc0-curve25519-dalek-source.git
synced 2026-09-08 20:40:32 +00:00
Merge branch 'release/0.4.4'
This commit is contained in:
commit
8b0306252a
2 changed files with 15 additions and 5 deletions
10
Cargo.toml
10
Cargo.toml
|
|
@ -1,7 +1,11 @@
|
||||||
[package]
|
[package]
|
||||||
name = "x25519-dalek"
|
name = "x25519-dalek"
|
||||||
version = "0.4.3"
|
version = "0.4.4"
|
||||||
authors = ["Isis Lovecruft <isis@patternsinthevoid.net>", "DebugSteven <debugsteven@gmail.com>"]
|
authors = [
|
||||||
|
"Isis Lovecruft <isis@patternsinthevoid.net>",
|
||||||
|
"DebugSteven <debugsteven@gmail.com>",
|
||||||
|
"Henry de Valence <hdevalence@hdevalence.ca>",
|
||||||
|
]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = "BSD-3-Clause"
|
license = "BSD-3-Clause"
|
||||||
repository = "https://github.com/dalek-cryptography/x25519-dalek"
|
repository = "https://github.com/dalek-cryptography/x25519-dalek"
|
||||||
|
|
@ -20,7 +24,7 @@ exclude = [
|
||||||
travis-ci = { repository = "dalek-cryptography/x25519-dalek", branch = "master"}
|
travis-ci = { repository = "dalek-cryptography/x25519-dalek", branch = "master"}
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
rustdoc-args = ["--html-in-header", ".cargo/registry/src/github.com-1ecc6299db9ec823/curve25519-dalek-1.0.1/docs/assets/rustdoc-include-katex-header.html"]
|
#rustdoc-args = ["--html-in-header", ".cargo/registry/src/github.com-1ecc6299db9ec823/curve25519-dalek-1.0.1/docs/assets/rustdoc-include-katex-header.html"]
|
||||||
features = ["nightly"]
|
features = ["nightly"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,14 @@ impl From<[u8; 32]> for EphemeralPublic {
|
||||||
fn from(bytes: [u8; 32]) -> EphemeralPublic {
|
fn from(bytes: [u8; 32]) -> EphemeralPublic {
|
||||||
EphemeralPublic(MontgomeryPoint(bytes))
|
EphemeralPublic(MontgomeryPoint(bytes))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl EphemeralPublic {
|
||||||
|
/// View this ephemeral public key as a byte array.
|
||||||
|
#[inline]
|
||||||
|
pub fn as_bytes(&self) -> &[u8; 32] {
|
||||||
|
self.0.as_bytes()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A DH ephemeral secret key.
|
/// A DH ephemeral secret key.
|
||||||
|
|
@ -85,11 +92,10 @@ impl Drop for SharedSecret {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SharedSecret {
|
impl SharedSecret {
|
||||||
|
|
||||||
/// View this shared secret key as a byte array.
|
/// View this shared secret key as a byte array.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn as_bytes(&self) -> &[u8; 32] {
|
pub fn as_bytes(&self) -> &[u8; 32] {
|
||||||
&self.0.as_bytes()
|
self.0.as_bytes()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue