summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-07-31 14:13:52 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-07-31 17:58:01 +0200
commitef33c224d80445f15673198587d6ab462f1cef31 (patch)
treed7a448f6d18be3ba946a115da834b82981d764d9
parentb18a76eff90c1adbabd609dfd79f930067a8cea8 (diff)
openpgp: Improve documentation of crypto::Password.
- See #474.
-rw-r--r--openpgp/src/crypto/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/openpgp/src/crypto/mod.rs b/openpgp/src/crypto/mod.rs
index d3abcbf3..856fc6a7 100644
--- a/openpgp/src/crypto/mod.rs
+++ b/openpgp/src/crypto/mod.rs
@@ -134,10 +134,12 @@ impl fmt::Debug for SessionKey {
/// Holds a password.
///
+/// `Password`s can be converted from various types using [`From`].
/// The password is encrypted in memory and only decrypted on demand.
/// See [`mem::Encrypted`] for details.
///
-/// [`mem::Encrypted`]: mem/struct.Encrypted.html
+/// [`From`]: https://doc.rust-lang.org/std/convert/trait.From.html
+/// [`mem::Encrypted`]: mem/struct.Encrypted.html
#[derive(Clone, PartialEq, Eq)]
pub struct Password(mem::Encrypted);