Struct yubikey::YubiKeyHandle
source · [−]pub struct YubiKeyHandle<'a> { /* private fields */ }
Expand description
A handle to an open YubiKey.
Implementations
sourceimpl<'a> YubiKeyHandle<'a>
impl<'a> YubiKeyHandle<'a>
sourcepub fn challenge_response_hmac(
&mut self,
slot: Slot,
variable: bool,
challenge: &[u8]
) -> Result<Hmac, Error>
pub fn challenge_response_hmac(
&mut self,
slot: Slot,
variable: bool,
challenge: &[u8]
) -> Result<Hmac, Error>
Perform a challenge-response in HMAC-SHA1 mode. If variable
is true
, and the YubiKey is configured in variable length
mode, challenges can be of any length up to 63 bytes. Else,
challenges must be exactly 64 bytes long.
sourcepub fn challenge_response_otp(
&mut self,
slot: Slot,
challenge: &[u8; 6]
) -> Result<Aes128Block, Error>
pub fn challenge_response_otp(
&mut self,
slot: Slot,
challenge: &[u8; 6]
) -> Result<Aes128Block, Error>
Perform a challenge-response in OTP mode. Returns the message from the YubiKey, decrypted.
Auto Trait Implementations
impl<'a> RefUnwindSafe for YubiKeyHandle<'a>
impl<'a> !Send for YubiKeyHandle<'a>
impl<'a> !Sync for YubiKeyHandle<'a>
impl<'a> Unpin for YubiKeyHandle<'a>
impl<'a> UnwindSafe for YubiKeyHandle<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more