diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-06-28 15:36:10 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-06-28 16:58:43 +0200 |
commit | 09c8dfc78c278eacbb986c12a189826e94e68c22 (patch) | |
tree | 2a0c28ffdef22b86efac3ff9523aa9947c6be225 /openpgp/src/crypto/mem.rs | |
parent | 20cae96915c9acd5e36c426e8ca3f0fc70b80693 (diff) |
openpgp: Rework protection of mpis::SecretKey.
- Introduce a new type, ProtectedMPI, that uses
crypto::mem::Protected for storing the MPI. Change
mpis::SecretKey to use this.
- Fixes #181.
Diffstat (limited to 'openpgp/src/crypto/mem.rs')
-rw-r--r-- | openpgp/src/crypto/mem.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openpgp/src/crypto/mem.rs b/openpgp/src/crypto/mem.rs index f08b9f68..45447719 100644 --- a/openpgp/src/crypto/mem.rs +++ b/openpgp/src/crypto/mem.rs @@ -10,7 +10,7 @@ use memsec; /// Holds a session key. /// /// The session key is cleared when dropped. -#[derive(Clone, Eq)] +#[derive(Clone, Eq, Hash)] pub struct Protected(Pin<Box<[u8]>>); impl PartialEq for Protected { |