Struct challenge_response::configure::DeviceModeConfig
source · #[repr(C, packed(1))]pub struct DeviceModeConfig {
pub fixed: [u8; 16],
pub uid: [u8; 6],
pub key: [u8; 16],
pub acc_code: [u8; 6],
pub fixed_size: u8,
pub ext_flags: ExtendedFlags,
pub tkt_flags: TicketFlags,
pub cfg_flags: ConfigFlags,
pub rfu: [u8; 2],
pub crc: u16,
}Expand description
The configuration of a YubiKey.
Fields§
§fixed: [u8; 16]§uid: [u8; 6]§key: [u8; 16]§acc_code: [u8; 6]§fixed_size: u8§ext_flags: ExtendedFlags§tkt_flags: TicketFlags§cfg_flags: ConfigFlags§rfu: [u8; 2]§crc: u16Implementations§
source§impl DeviceModeConfig
impl DeviceModeConfig
sourcepub fn challenge_response_hmac(
&mut self,
secret: &HmacKey,
variable: bool,
button_press: bool
)
pub fn challenge_response_hmac( &mut self, secret: &HmacKey, variable: bool, button_press: bool )
Sets the configuration in challenge-response, HMAC-SHA1
mode. This mode has two sub-modes: if variable is true,
the challenges can be of variable length up to 63 bytes. Else,
all challenges must be exactly 64 bytes long.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for DeviceModeConfig
impl Send for DeviceModeConfig
impl Sync for DeviceModeConfig
impl Unpin for DeviceModeConfig
impl UnwindSafe for DeviceModeConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more