Made StaticSecret cloneable

This commit is contained in:
Michael Rosenberg 2019-03-22 12:50:55 -04:00
parent 45bc970eec
commit 935f6e8e35
No known key found for this signature in database
GPG key ID: 65957070579A8C49

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.