summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-07-31 17:55:25 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-07-31 17:58:01 +0200
commit9fc4b84a0d01e2bb398a58bd9585fc51d12fd531 (patch)
tree56d560df8692ce0859b223ad565a56b6f8514ab7
parent6b26530de49bdd62f388b383975ef42538d8b4d9 (diff)
openpgp: Improve the introduction of module crypto.
- See #474.
-rw-r--r--openpgp/src/crypto/mod.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/openpgp/src/crypto/mod.rs b/openpgp/src/crypto/mod.rs
index 856fc6a7..c4ea6ab8 100644
--- a/openpgp/src/crypto/mod.rs
+++ b/openpgp/src/crypto/mod.rs
@@ -1,4 +1,21 @@
//! Cryptographic primitives.
+//!
+//! This module contains cryptographic primitives as defined and used
+//! by OpenPGP. It abstracts over the cryptographic library chosen at
+//! compile time. Most of the time, it will not be necessary to
+//! explicitly use types from this module directly, but they are used
+//! in the API (e.g. [`Password`]). Advanced users may use these
+//! primitives to provide custom extensions to OpenPGP.
+//!
+//! [`Password`]: struct.Password.html
+//!
+//! # Common Operations
+//!
+//! - *Converting a string to a `Password`*: Use [`Password::from`].
+//! - *Create a session key*: Use [`SessionKey::new`].
+//!
+//! [`Password::from`]: https://doc.rust-lang.org/std/convert/trait.From.html
+//! [`SessionKey::new`]: struct.SessionKey.html#method.new
use std::io::Read;
use std::ops::{Deref, DerefMut};