summaryrefslogtreecommitdiffstats
path: root/openpgp/examples
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-03-18 14:04:23 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-03-18 14:47:44 +0100
commit97cdc3062d88401dcc849c3f4e093a4f7b1b1226 (patch)
tree0859e06007b25e9cabbf4e9bfd7a2487ea2e8585 /openpgp/examples
parent01db33b99244294702f0f58f06c6736becee28db (diff)
openpgp: Make cipher algorithm configurable in streaming Encryptor.
- Fixes #208.
Diffstat (limited to 'openpgp/examples')
-rw-r--r--openpgp/examples/encrypt-for.rs3
-rw-r--r--openpgp/examples/generate-encrypt-decrypt.rs3
2 files changed, 4 insertions, 2 deletions
diff --git a/openpgp/examples/encrypt-for.rs b/openpgp/examples/encrypt-for.rs
index 51f5a981..3fd1217c 100644
--- a/openpgp/examples/encrypt-for.rs
+++ b/openpgp/examples/encrypt-for.rs
@@ -49,7 +49,8 @@ fn main() {
let encryptor = Encryptor::new(message,
&[], // No symmetric encryption.
&recipients,
- mode)
+ mode,
+ None)
.expect("Failed to create encryptor");
let mut literal_writer = LiteralWriter::new(encryptor, DataFormat::Binary,
None, None)
diff --git a/openpgp/examples/generate-encrypt-decrypt.rs b/openpgp/examples/generate-encrypt-decrypt.rs
index 3fb00103..369e82ba 100644
--- a/openpgp/examples/generate-encrypt-decrypt.rs
+++ b/openpgp/examples/generate-encrypt-decrypt.rs
@@ -46,7 +46,8 @@ fn encrypt(sink: &mut Write, plaintext: &str, recipient: &openpgp::TPK)
let encryptor = Encryptor::new(message,
&[], // No symmetric encryption.
&[recipient],
- EncryptionMode::ForTransport)?;
+ EncryptionMode::ForTransport,
+ None)?;
// Emit a literal data packet.
let mut literal_writer = LiteralWriter::new(