summaryrefslogtreecommitdiffstats
path: root/openpgp/src/serialize.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-08-11 11:16:34 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-08-11 14:32:13 +0200
commitc325bd5eee79cd83cc844e2dc7957aac4897ca61 (patch)
tree0ea0ad7df00bbdbd47f00af97fb6cf1d8ffc1d90 /openpgp/src/serialize.rs
parentdbed49a39a5e175d21902e63f9a6adf8ac9b848c (diff)
openpgp: Mark S2K::Simple and S2K::Salted as deprecated.
Diffstat (limited to 'openpgp/src/serialize.rs')
-rw-r--r--openpgp/src/serialize.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/openpgp/src/serialize.rs b/openpgp/src/serialize.rs
index 2f8cbed4..8dc45808 100644
--- a/openpgp/src/serialize.rs
+++ b/openpgp/src/serialize.rs
@@ -1240,6 +1240,7 @@ impl MarshalInto for crypto::mpi::Signature {
impl Marshal for S2K {
fn serialize(&self, w: &mut dyn std::io::Write) -> Result<()> {
+ #[allow(deprecated)]
match self {
&S2K::Simple{ hash } => {
w.write_all(&[0, hash.into()])?;
@@ -1264,6 +1265,7 @@ impl Marshal for S2K {
impl MarshalInto for S2K {
fn serialized_len(&self) -> usize {
+ #[allow(deprecated)]
match self {
&S2K::Simple{ .. } => 2,
&S2K::Salted{ .. } => 2 + 8,