aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2019-01-03 11:45:17 +0100
committerRobin Krahl <robin.krahl@ireas.org>2019-01-03 11:45:17 +0100
commit1061005a82ed0ba6ad5c48322e704f786bd802ab (patch)
tree64704b40fec4f7cd420497c77df7b6e36fe50c5c
parent8ffdc893510b8d0026821547f1f0390e8539e03e (diff)
downloadnitrokey-rs-1061005a82ed0ba6ad5c48322e704f786bd802ab.tar.gz
nitrokey-rs-1061005a82ed0ba6ad5c48322e704f786bd802ab.tar.bz2
Document decryption failure for get_password_safe
After a factory reset, the password safe cannot be accessed as its secret cannot be decrypted. This patch improves the documentation for GetPasswordSafe::get_password_safe to reflect this behavior.
-rw-r--r--src/pws.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pws.rs b/src/pws.rs
index 99a256e..c20ad1d 100644
--- a/src/pws.rs
+++ b/src/pws.rs
@@ -73,7 +73,11 @@ pub trait GetPasswordSafe {
///
/// # Errors
///
+ /// - [`AesDecryptionFailed`][] if the secret for the password safe could not be decrypted
+ /// (Nitrokey Pro only)
/// - [`InvalidString`][] if one of the provided passwords contains a null byte
+ /// - [`Unknown`][] if the secret for the password safe could not be decrypted (Nitrokey
+ /// Storage only)
/// - [`WrongPassword`][] if the current user password is wrong
///
/// # Example
@@ -99,7 +103,9 @@ pub trait GetPasswordSafe {
///
/// [`device`]: struct.PasswordSafe.html#method.device
/// [`lock`]: trait.Device.html#method.lock
+ /// [`AesDecryptionFailed`]: enum.CommandError.html#variant.AesDecryptionFailed
/// [`InvalidString`]: enum.CommandError.html#variant.InvalidString
+ /// [`Unknown`]: enum.CommandError.html#variant.Unknown
/// [`WrongPassword`]: enum.CommandError.html#variant.WrongPassword
fn get_password_safe(&self, user_pin: &str) -> Result<PasswordSafe<'_>, CommandError>;
}