summaryrefslogtreecommitdiffstats
path: root/openpgp/src/message/mod.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-08-12 11:02:51 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-08-12 13:34:02 +0200
commit5a5e909dd1cc5949d1995a7bf48e7ad11ee40e45 (patch)
treee05041e689a1598097286579cc7e01e9084a7945 /openpgp/src/message/mod.rs
parentaeeb728a6dcef2eafa53d3754c67cadd765820a2 (diff)
openpgp: Improve SKESK?::with_password.
- Previously, the symmetric algorithm argument conflated the algorithm to protect the payload and the one to protect the session key. Fix that by adding an argument to make the choice explicit.
Diffstat (limited to 'openpgp/src/message/mod.rs')
-rw-r--r--openpgp/src/message/mod.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/openpgp/src/message/mod.rs b/openpgp/src/message/mod.rs
index 92346701..a436fde0 100644
--- a/openpgp/src/message/mod.rs
+++ b/openpgp/src/message/mod.rs
@@ -1057,6 +1057,7 @@ mod tests {
#[allow(deprecated)]
packets.push(SKESK4::with_password(
cipher,
+ cipher,
S2K::Simple { hash: HashAlgorithm::SHA256 },
&sk,
&"12345678".into()).unwrap().into());