summaryrefslogtreecommitdiffstats
path: root/openpgp/src/crypto
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-01-03 13:03:59 +0100
committerJustus Winter <justus@sequoia-pgp.org>2020-01-03 13:12:03 +0100
commit5b0a9623a4c2e5a44300fdf149c757972c0d2497 (patch)
tree8b8e4bc4e6945a97b4da789a4f5df871ab8abd4d /openpgp/src/crypto
parentfe2f0ab072acd0ba81ee23a91cba3d689bb8334b (diff)
openpgp: Make Protected::into_vec private, remove from SessionKey.
Diffstat (limited to 'openpgp/src/crypto')
-rw-r--r--openpgp/src/crypto/mem.rs2
-rw-r--r--openpgp/src/crypto/mod.rs5
2 files changed, 1 insertions, 6 deletions
diff --git a/openpgp/src/crypto/mem.rs b/openpgp/src/crypto/mem.rs
index 1bfec9a9..780db044 100644
--- a/openpgp/src/crypto/mem.rs
+++ b/openpgp/src/crypto/mem.rs
@@ -31,7 +31,7 @@ impl Hash for Protected {
impl Protected {
/// Converts to a buffer for modification.
- pub unsafe fn into_vec(self) -> Vec<u8> {
+ pub(crate) unsafe fn into_vec(self) -> Vec<u8> {
self.iter().cloned().collect()
}
}
diff --git a/openpgp/src/crypto/mod.rs b/openpgp/src/crypto/mod.rs
index e4b26810..904eaea2 100644
--- a/openpgp/src/crypto/mod.rs
+++ b/openpgp/src/crypto/mod.rs
@@ -47,11 +47,6 @@ impl SessionKey {
random(&mut sk);
Self(sk)
}
-
- /// Converts to a buffer for modification.
- pub unsafe fn into_vec(self) -> Vec<u8> {
- self.0.into_vec()
- }
}
impl Deref for SessionKey {