From 1061005a82ed0ba6ad5c48322e704f786bd802ab Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Thu, 3 Jan 2019 11:45:17 +0100 Subject: 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. --- src/pws.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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, CommandError>; } -- cgit v1.2.3