diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2018-05-28 18:14:14 +0000 |
---|---|---|
committer | Robin Krahl <robin.krahl@ireas.org> | 2018-05-28 20:17:14 +0200 |
commit | cea0aed29feef1d07d91670ea63cd6af45efdfee (patch) | |
tree | b7fbf0cc327b3432fefa7a0d9a5693bb672e3fa4 /src/otp.rs | |
parent | ff15cbec83dbd01c8b544453dcb825670d0f7df4 (diff) | |
download | nitrokey-rs-cea0aed29feef1d07d91670ea63cd6af45efdfee.tar.gz nitrokey-rs-cea0aed29feef1d07d91670ea63cd6af45efdfee.tar.bz2 |
Rewrap documentation comments to 100 characters
Diffstat (limited to 'src/otp.rs')
-rw-r--r-- | src/otp.rs | 28 |
1 files changed, 12 insertions, 16 deletions
@@ -13,8 +13,8 @@ pub enum OtpMode { /// Provides methods to configure and erase OTP slots on a Nitrokey device. pub trait ConfigureOtp { - /// Configure an HOTP slot with the given data and set the HOTP counter to - /// the given value (default 0). + /// Configure an HOTP slot with the given data and set the HOTP counter to the given value + /// (default 0). /// /// # Errors /// @@ -49,8 +49,8 @@ pub trait ConfigureOtp { /// [`NoName`]: enum.CommandError.html#variant.NoName fn write_hotp_slot(&self, data: OtpSlotData, counter: u64) -> CommandStatus; - /// Configure a TOTP slot with the given data and set the TOTP time window - /// to the given value (default 30). + /// Configure a TOTP slot with the given data and set the TOTP time window to the given value + /// (default 30). /// /// # Errors /// @@ -207,9 +207,8 @@ pub trait GenerateOtp { unsafe { result_from_string(nitrokey_sys::NK_get_totp_slot_name(slot)) } } - /// Generates an HOTP code on the given slot. This operation may require - /// user authorization, depending on the device configuration (see - /// [`get_config`][]). + /// Generates an HOTP code on the given slot. This operation may require user authorization, + /// depending on the device configuration (see [`get_config`][]). /// /// # Errors /// @@ -241,12 +240,11 @@ pub trait GenerateOtp { } } - /// Generates a TOTP code on the given slot. This operation may require - /// user authorization, depending on the device configuration (see - /// [`get_config`][]). + /// Generates a TOTP code on the given slot. This operation may require user authorization, + /// depending on the device configuration (see [`get_config`][]). /// - /// To make sure that the Nitrokey’s time is in sync, consider calling - /// [`set_time`][] before calling this method. + /// To make sure that the Nitrokey’s time is in sync, consider calling [`set_time`][] before + /// calling this method. /// /// # Errors /// @@ -291,8 +289,7 @@ pub trait GenerateOtp { /// The configuration for an OTP slot. #[derive(Debug)] pub struct OtpSlotData { - /// The number of the slot – must be less than three for HOTP and less than - /// 15 for TOTP. + /// The number of the slot – must be less than three for HOTP and less than 15 for TOTP. pub number: u8, /// The name of the slot – must not be empty. pub name: String, @@ -303,8 +300,7 @@ pub struct OtpSlotData { /// If true, press the enter key after sending an OTP code using double-pressed /// numlock, capslock or scrolllock. pub use_enter: bool, - /// Set the token ID, see [OATH Token Identifier Specification][tokspec], section - /// “Class A”. + /// Set the token ID, see [OATH Token Identifier Specification][tokspec], section “Class A”. /// /// [tokspec]: https://openauthentication.org/token-specs/ pub token_id: Option<String>, |