diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2023-05-24 14:17:17 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2023-06-20 12:09:05 +0200 |
commit | 1056f917553f0c6a231c240251548f982b81b31d (patch) | |
tree | 388d59baee30f626d69224f96dc58a45719f5953 /openpgp/src | |
parent | 8e2dcd5287b24d246ae2083821fb83f39b34e1bc (diff) |
openpgp: Add SessionKey::as_protected.
Diffstat (limited to 'openpgp/src')
-rw-r--r-- | openpgp/src/crypto/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/openpgp/src/crypto/mod.rs b/openpgp/src/crypto/mod.rs index 74a5c860..1c136102 100644 --- a/openpgp/src/crypto/mod.rs +++ b/openpgp/src/crypto/mod.rs @@ -117,6 +117,11 @@ impl SessionKey { random(&mut sk); Self(sk) } + + /// Returns a reference to the inner [`mem::Protected`]. + pub fn as_protected(&self) -> &mem::Protected { + &self.0 + } } impl Deref for SessionKey { |