diff options
Diffstat (limited to 'guide')
-rw-r--r-- | guide/src/chapter_01.md | 12 | ||||
-rw-r--r-- | guide/src/chapter_02.md | 12 |
2 files changed, 8 insertions, 16 deletions
diff --git a/guide/src/chapter_01.md b/guide/src/chapter_01.md index d82d8bb0..76fee1a9 100644 --- a/guide/src/chapter_01.md +++ b/guide/src/chapter_01.md @@ -61,8 +61,7 @@ fn main() { # 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())?; @@ -204,8 +203,7 @@ fn generate() -> openpgp::Result<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())?; @@ -347,8 +345,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())?; @@ -501,8 +498,7 @@ Verified data can be read from this using [`io::Read`]. # 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/guide/src/chapter_02.md b/guide/src/chapter_02.md index e29f412c..43418bca 100644 --- a/guide/src/chapter_02.md +++ b/guide/src/chapter_02.md @@ -69,8 +69,7 @@ fn main() { # 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())?; @@ -213,8 +212,7 @@ fn generate() -> openpgp::Result<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())?; @@ -357,8 +355,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())?; @@ -515,8 +512,7 @@ Decrypted data can be read from this using [`io::Read`]. # 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())?; |