diff options
author | Neal H. Walfield <neal@pep.foundation> | 2020-05-28 10:34:00 +0200 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2020-05-28 10:36:07 +0200 |
commit | 44f677ce10e2af6dbab532f996cf685e8c55afe5 (patch) | |
tree | 776ab63b1220d27d053b4da4e4c24000a0cd11c0 /openpgp/src/packet/mod.rs | |
parent | 1dabf056697191872ad3f19c4a9bbd4a760b746b (diff) |
openpgp: Improve Key::decrypt_secret's discoverability
- At appropriate places in the documentation, add a reference to
`Key::decrypt_secret`.
Diffstat (limited to 'openpgp/src/packet/mod.rs')
-rw-r--r-- | openpgp/src/packet/mod.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/openpgp/src/packet/mod.rs b/openpgp/src/packet/mod.rs index a1f6480f..fec3ee2a 100644 --- a/openpgp/src/packet/mod.rs +++ b/openpgp/src/packet/mod.rs @@ -1332,7 +1332,10 @@ impl<R: key::KeyRole> Key<key::SecretParts, R> { /// /// # Errors /// - /// Fails if the secret key is missing, or encrypted. + /// Fails if the secret key is encrypted. You can use + /// [`Key::decrypt_secret`] to decrypt a key. + /// + /// [`Key::decrypt_secret`]: key.html#method.decrypt_secret pub fn into_keypair(self) -> Result<KeyPair> { use crate::packet::key::SecretKeyMaterial; let (key, secret) = self.take_secret(); @@ -1491,7 +1494,10 @@ impl<R: key::KeyRole> key::Key4<key::SecretParts, R> { /// /// # Errors /// - /// Fails if the secret key is missing, or encrypted. + /// Fails if the secret key is encrypted. You can use + /// [`Key::decrypt_secret`] to decrypt a key. + /// + /// [`Key::decrypt_secret`]: key.html#method.decrypt_secret pub fn into_keypair(self) -> Result<KeyPair> { use crate::packet::key::SecretKeyMaterial; let (key, secret) = self.take_secret(); |