summaryrefslogtreecommitdiffstats
path: root/sop
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-05-13 13:46:41 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-05-13 16:04:03 +0200
commit3928cd36f63869fc37c78d991d38d13badcb4e80 (patch)
treecc1d543ec948fa48a79c9c99ed570f19364bd45b /sop
parented092e1bf26f7473c058b0c4524348538d649d2f (diff)
openpgp: Unawkwardify Encryptor::add_password.
Diffstat (limited to 'sop')
-rw-r--r--sop/src/main.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/sop/src/main.rs b/sop/src/main.rs
index f708e001..f8abce91 100644
--- a/sop/src/main.rs
+++ b/sop/src/main.rs
@@ -302,14 +302,12 @@ fn real_main() -> Result<()> {
// Encrypt the message.
let mut encryptor =
Encryptor::for_recipients(message, recipients)
+ .add_passwords(passwords)
.symmetric_algo(
symmetric_algos.get(0).cloned().unwrap_or_default());
if let Some(&a) = aead_algos.get(0) {
encryptor = encryptor.aead_algo(a);
}
- for p in passwords {
- encryptor = encryptor.add_password(p);
- }
let message = encryptor.build()
.context("Failed to create encryptor")?;