summaryrefslogtreecommitdiffstats
path: root/guide
diff options
context:
space:
mode:
Diffstat (limited to 'guide')
-rw-r--r--guide/Cargo.toml7
-rw-r--r--guide/src/chapter_01.md6
-rw-r--r--guide/src/chapter_02.md8
-rw-r--r--guide/src/chapter_03.md20
-rw-r--r--guide/src/lib.rs10
5 files changed, 29 insertions, 22 deletions
diff --git a/guide/Cargo.toml b/guide/Cargo.toml
index a8d09c8f..713c6143 100644
--- a/guide/Cargo.toml
+++ b/guide/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "sequoia-guide"
-version = "0.21.0"
+version = "0.22.0"
authors = [
"Justus Winter <justus@sequoia-pgp.org>",
"Kai Michaelis <kai@sequoia-pgp.org>",
@@ -12,5 +12,8 @@ repository = "https://gitlab.com/sequoia-pgp/sequoia"
build = "build.rs"
[dependencies]
-sequoia-openpgp = { path = "../openpgp", version = "0.21" }
+sequoia-openpgp = { path = "../openpgp", version = "1.0.0" }
anyhow = "1.0.18"
+
+[lib]
+bench = false
diff --git a/guide/src/chapter_01.md b/guide/src/chapter_01.md
index 0a60b1ea..e4fc4fe6 100644
--- a/guide/src/chapter_01.md
+++ b/guide/src/chapter_01.md
@@ -6,7 +6,7 @@ will construct this program from top to bottom, concatenating the
fragments yields the [`openpgp/examples/generate-sign-verify.rs`].
[low-level API]: ../../sequoia_openpgp/index.html
-[`openpgp/examples/generate-sign-verify.rs`]: https://gitlab.com/sequoia-pgp/sequoia/blob/master/openpgp/examples/generate-sign-verify.rs
+[`openpgp/examples/generate-sign-verify.rs`]: https://gitlab.com/sequoia-pgp/sequoia/blob/main/openpgp/examples/generate-sign-verify.rs
```rust
use std::io::{self, Write};
@@ -622,5 +622,5 @@ create a signed message, or a detached signature, see
[`openpgp/examples/sign.rs`] and
[`openpgp/examples/sign-detached.rs`].
-[`openpgp/examples/sign.rs`]: https://gitlab.com/sequoia-pgp/sequoia/blob/master/openpgp/examples/sign.rs
-[`openpgp/examples/sign-detached.rs`]: https://gitlab.com/sequoia-pgp/sequoia/blob/master/openpgp/examples/sign-detached.rs
+[`openpgp/examples/sign.rs`]: https://gitlab.com/sequoia-pgp/sequoia/blob/main/openpgp/examples/sign.rs
+[`openpgp/examples/sign-detached.rs`]: https://gitlab.com/sequoia-pgp/sequoia/blob/main/openpgp/examples/sign-detached.rs
diff --git a/guide/src/chapter_02.md b/guide/src/chapter_02.md
index fc88f653..493528d7 100644
--- a/guide/src/chapter_02.md
+++ b/guide/src/chapter_02.md
@@ -6,7 +6,7 @@ We will construct this program from top to bottom, concatenating the
fragments yields the [`openpgp/examples/generate-encrypt-decrypt.rs`].
[low-level API]: ../../sequoia_openpgp/index.html
-[`openpgp/examples/generate-encrypt-decrypt.rs`]: https://gitlab.com/sequoia-pgp/sequoia/blob/master/openpgp/examples/generate-encrypt-decrypt.rs
+[`openpgp/examples/generate-encrypt-decrypt.rs`]: https://gitlab.com/sequoia-pgp/sequoia/blob/main/openpgp/examples/generate-encrypt-decrypt.rs
```rust
use std::io::{self, Write};
@@ -601,7 +601,7 @@ impl<'a> DecryptionHelper for Helper<'a> {
// XXX: In production code, return the Fingerprint of the
// recipient's Cert here
- Ok(None)
+ Ok(None)
}
}
```
@@ -613,5 +613,5 @@ encrypt or decrypt some messages, see
[`openpgp/examples/encrypt-for.rs`] and
[`openpgp/examples/decrypt-with.rs`].
-[`openpgp/examples/encrypt-for.rs`]: https://gitlab.com/sequoia-pgp/sequoia/blob/master/openpgp/examples/encrypt-for.rs
-[`openpgp/examples/decrypt-with.rs`]: https://gitlab.com/sequoia-pgp/sequoia/blob/master/openpgp/examples/decrypt-with.rs
+[`openpgp/examples/encrypt-for.rs`]: https://gitlab.com/sequoia-pgp/sequoia/blob/main/openpgp/examples/encrypt-for.rs
+[`openpgp/examples/decrypt-with.rs`]: https://gitlab.com/sequoia-pgp/sequoia/blob/main/openpgp/examples/decrypt-with.rs
diff --git a/guide/src/chapter_03.md b/guide/src/chapter_03.md
index b8f05dd2..e73e90fd 100644
--- a/guide/src/chapter_03.md
+++ b/guide/src/chapter_03.md
@@ -43,8 +43,8 @@ const KEY: &str =
fn main() -> openpgp::Result<()> {
let cert = openpgp::Cert::from_bytes(KEY.as_bytes())?;
- assert_eq!(cert.fingerprint().to_string(),
- "C087 4478 A65C 540A 1F73 72B4 A22E AD61 4D11 744A");
+ assert_eq!(cert.fingerprint().to_hex(),
+ "C0874478A65C540A1F7372B4A22EAD614D11744A");
// Iterate over UserIDs.
assert_eq!(cert.userids().count(), 1);
@@ -52,10 +52,10 @@ fn main() -> openpgp::Result<()> {
// Iterate over subkeys.
assert_eq!(cert.keys().subkeys().count(), 2);
- assert_eq!(cert.keys().subkeys().nth(0).unwrap().key().fingerprint().to_string(),
- "67A4 8753 A380 A6B3 B7DF 7DC5 E6C6 897A 4CEF 8924");
- assert_eq!(cert.keys().subkeys().nth(1).unwrap().key().fingerprint().to_string(),
- "185C DAA1 2723 0423 19E4 7F67 108F 2CAF 9034 356D");
+ assert_eq!(cert.keys().subkeys().nth(0).unwrap().key().fingerprint().to_hex(),
+ "67A48753A380A6B3B7DF7DC5E6C6897A4CEF8924");
+ assert_eq!(cert.keys().subkeys().nth(1).unwrap().key().fingerprint().to_hex(),
+ "185CDAA12723042319E47F67108F2CAF9034356D");
Ok(())
}
@@ -132,7 +132,7 @@ fn main() -> openpgp::Result<()> {
// First, we expect an one pass signature packet.
if let openpgp::Packet::OnePassSig(ref ops) = packets[0] {
- assert_eq!(ops.issuer().to_string(), "E6C6 897A 4CEF 8924");
+ assert_eq!(ops.issuer().to_hex(), "E6C6897A4CEF8924");
} else {
panic!("expected one pass signature packet");
}
@@ -146,8 +146,8 @@ fn main() -> openpgp::Result<()> {
// Finally, we expect the signature itself.
if let openpgp::Packet::Signature(ref signature) = packets[2] {
- assert_eq!(signature.issuer_fingerprints().nth(0).unwrap().to_string(),
- "67A4 8753 A380 A6B3 B7DF 7DC5 E6C6 897A 4CEF 8924");
+ assert_eq!(signature.issuer_fingerprints().nth(0).unwrap().to_hex(),
+ "67A48753A380A6B3B7DF7DC5E6C6897A4CEF8924");
} else {
panic!("expected signature packet");
}
@@ -183,7 +183,7 @@ e.g. for collecting statistics about the SKS keyserver dump. For a
complete example, see [`openpgp/examples/statistics.rs`].
[`PacketParser`]: ../../sequoia_openpgp/parse/struct.PacketParser.html
-[`openpgp/examples/statistics.rs`]: https://gitlab.com/sequoia-pgp/sequoia/blob/master/openpgp/examples/statistics.rs
+[`openpgp/examples/statistics.rs`]: https://gitlab.com/sequoia-pgp/sequoia/blob/main/openpgp/examples/statistics.rs
```rust
use std::io::Read;
diff --git a/guide/src/lib.rs b/guide/src/lib.rs
index c1760d02..3956dd91 100644
--- a/guide/src/lib.rs
+++ b/guide/src/lib.rs
@@ -11,12 +11,16 @@ sure that this guide is always up-to-date.
For more inspiration, see our various [examples] and our
command-line frontends [sq] and [sqv].
-[examples]: https://gitlab.com/sequoia-pgp/sequoia/tree/master/openpgp/examples
-[sq]: https://gitlab.com/sequoia-pgp/sequoia/tree/master/sq
-[sqv]: https://gitlab.com/sequoia-pgp/sequoia/tree/master/sqv
+[examples]: https://gitlab.com/sequoia-pgp/sequoia/tree/main/openpgp/examples
+[sq]: https://gitlab.com/sequoia-pgp/sequoia/tree/main/sq
+[sqv]: https://gitlab.com/sequoia-pgp/sequoia/tree/main/sqv
Happy climbing!
"]
+#![doc(html_favicon_url = "https://docs.sequoia-pgp.org/favicon.png")]
+#![doc(html_logo_url = "https://docs.sequoia-pgp.org/logo.svg")]
+#![warn(missing_docs)]
+
include!(concat!(env!("OUT_DIR"), "/src/lib.rs"));