diff options
Diffstat (limited to 'openpgp/examples')
-rw-r--r-- | openpgp/examples/encrypt-for.rs | 4 | ||||
-rw-r--r-- | openpgp/examples/generate-encrypt-decrypt.rs | 3 | ||||
-rw-r--r-- | openpgp/examples/generate-sign-verify.rs | 3 | ||||
-rw-r--r-- | openpgp/examples/notarize.rs | 3 | ||||
-rw-r--r-- | openpgp/examples/pad.rs | 4 | ||||
-rw-r--r-- | openpgp/examples/sign.rs | 3 | ||||
-rw-r--r-- | openpgp/examples/wrap-literal.rs | 4 |
7 files changed, 7 insertions, 17 deletions
diff --git a/openpgp/examples/encrypt-for.rs b/openpgp/examples/encrypt-for.rs index 327cb56d..47fb703d 100644 --- a/openpgp/examples/encrypt-for.rs +++ b/openpgp/examples/encrypt-for.rs @@ -6,7 +6,6 @@ use std::io; extern crate sequoia_openpgp as openpgp; use crate::openpgp::armor; -use crate::openpgp::constants::DataFormat; use crate::openpgp::packet::KeyFlags; use crate::openpgp::parse::Parse; use crate::openpgp::serialize::stream::{ @@ -57,8 +56,7 @@ fn main() { &recipients, None, None) .expect("Failed to create encryptor"); - let mut literal_writer = LiteralWriter::new(encryptor, DataFormat::Binary, - None, None) + let mut literal_writer = LiteralWriter::new(encryptor, None, None, None) .expect("Failed to create literal writer"); // Copy stdin to our writer stack to encrypt the data. diff --git a/openpgp/examples/generate-encrypt-decrypt.rs b/openpgp/examples/generate-encrypt-decrypt.rs index c0c4c4ed..6157019f 100644 --- a/openpgp/examples/generate-encrypt-decrypt.rs +++ b/openpgp/examples/generate-encrypt-decrypt.rs @@ -60,8 +60,7 @@ fn encrypt(sink: &mut Write, plaintext: &str, recipient: &openpgp::TPK) None, None)?; // Emit a literal data packet. - let mut literal_writer = LiteralWriter::new( - encryptor, openpgp::constants::DataFormat::Binary, None, None)?; + let mut literal_writer = LiteralWriter::new(encryptor, None, None, None)?; // Encrypt the data. literal_writer.write_all(plaintext.as_bytes())?; diff --git a/openpgp/examples/generate-sign-verify.rs b/openpgp/examples/generate-sign-verify.rs index 36582e6b..8625e4ea 100644 --- a/openpgp/examples/generate-sign-verify.rs +++ b/openpgp/examples/generate-sign-verify.rs @@ -50,8 +50,7 @@ fn sign(sink: &mut Write, plaintext: &str, tsk: &openpgp::TPK) let signer = Signer::new(message, vec![&mut keypair], None)?; // Emit a literal data packet. - let mut literal_writer = LiteralWriter::new( - signer, openpgp::constants::DataFormat::Binary, None, None)?; + let mut literal_writer = LiteralWriter::new(signer, None, None, None)?; // Sign the data. literal_writer.write_all(plaintext.as_bytes())?; diff --git a/openpgp/examples/notarize.rs b/openpgp/examples/notarize.rs index 271e9b42..eedcc01e 100644 --- a/openpgp/examples/notarize.rs +++ b/openpgp/examples/notarize.rs @@ -9,7 +9,6 @@ use crate::openpgp::{ armor, crypto, Packet, - constants::DataFormat, parse::{Parse, PacketParserResult}, serialize::Serialize, }; @@ -90,7 +89,7 @@ fn main() { // Then, create a literal writer to wrap the data in a // literal message packet. let mut literal = - LiteralWriter::new(signer, DataFormat::Binary, None, None) + LiteralWriter::new(signer, None, None, None) .expect("Failed to create literal writer"); // Copy all the data. diff --git a/openpgp/examples/pad.rs b/openpgp/examples/pad.rs index a959786d..681bfe53 100644 --- a/openpgp/examples/pad.rs +++ b/openpgp/examples/pad.rs @@ -6,7 +6,6 @@ use std::io; extern crate sequoia_openpgp as openpgp; use crate::openpgp::armor; -use crate::openpgp::constants::DataFormat; use crate::openpgp::KeyID; use crate::openpgp::packet::KeyFlags; use crate::openpgp::parse::Parse; @@ -63,8 +62,7 @@ fn main() { let padder = Padder::new(encryptor, padme) .expect("Failed to create padder"); - let mut literal_writer = LiteralWriter::new(padder, DataFormat::Binary, - None, None) + let mut literal_writer = LiteralWriter::new(padder, None, None, None) .expect("Failed to create literal writer"); // Copy stdin to our writer stack to encrypt the data. diff --git a/openpgp/examples/sign.rs b/openpgp/examples/sign.rs index bdb29c4c..7a7bcd91 100644 --- a/openpgp/examples/sign.rs +++ b/openpgp/examples/sign.rs @@ -6,7 +6,6 @@ use std::io; extern crate sequoia_openpgp as openpgp; use crate::openpgp::armor; use crate::openpgp::crypto; -use crate::openpgp::constants::DataFormat; use crate::openpgp::parse::Parse; use crate::openpgp::serialize::stream::{Message, LiteralWriter, Signer}; @@ -67,7 +66,7 @@ fn main() { // Then, create a literal writer to wrap the data in a literal // message packet. - let mut literal = LiteralWriter::new(signer, DataFormat::Binary, None, None) + let mut literal = LiteralWriter::new(signer, None, None, None) .expect("Failed to create literal writer"); // Copy all the data. diff --git a/openpgp/examples/wrap-literal.rs b/openpgp/examples/wrap-literal.rs index e50b8de7..d3eed376 100644 --- a/openpgp/examples/wrap-literal.rs +++ b/openpgp/examples/wrap-literal.rs @@ -8,7 +8,6 @@ use std::io; extern crate sequoia_openpgp as openpgp; use crate::openpgp::armor; -use crate::openpgp::constants::DataFormat; use crate::openpgp::serialize::stream::{Message, LiteralWriter}; fn main() { @@ -29,8 +28,7 @@ fn main() { // Then, create a literal writer to wrap the data in a literal // message packet. - let mut literal = LiteralWriter::new(message, DataFormat::Binary, - None, None) + let mut literal = LiteralWriter::new(message, None, None, None) .expect("Failed to create literal writer"); // Copy all the data. |