diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2019-01-03 11:45:17 +0100 |
---|---|---|
committer | Robin Krahl <robin.krahl@ireas.org> | 2019-01-03 11:45:17 +0100 |
commit | 1061005a82ed0ba6ad5c48322e704f786bd802ab (patch) | |
tree | 64704b40fec4f7cd420497c77df7b6e36fe50c5c /src | |
parent | 8ffdc893510b8d0026821547f1f0390e8539e03e (diff) | |
download | nitrokey-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.
Diffstat (limited to 'src')
-rw-r--r-- | src/pws.rs | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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>; } |