Merge pull request #40 from rozbb/master

Made StaticSecret cloneable
This commit is contained in:
Henry de Valence 2019-03-22 10:23:08 -07:00 committed by GitHub
commit 9aa1b8bd4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,6 +86,7 @@ impl<'a> From<&'a EphemeralSecret> for PublicKey {
/// A `StaticSecret` is a static Diffie-Hellman secret key that
/// can be saved and loaded to create a `SharedSecret` when given
/// their `PublicKey`.
#[derive(Clone)]
pub struct StaticSecret(pub (crate) Scalar);
/// Overwrite static secret key material with null bytes when it goes out of scope.