Struct oath_authenticator::authenticator::Authenticator
source · [−]pub struct Authenticator<T> { /* private fields */ }
Expand description
The TOTP authenticator Trussed® app.
Implementations
sourceimpl<T> Authenticator<T> where
T: Client + HmacSha1 + HmacSha256 + Sha256,
impl<T> Authenticator<T> where
T: Client + HmacSha1 + HmacSha256 + Sha256,
pub fn new(trussed: T) -> Self
pub fn respond<const C: usize, const R: usize>(
&mut self,
command: &Command<C>,
reply: &mut Data<R>
) -> Result<()>
pub fn select<const R: usize>(
&mut self,
_select: Select<'_>,
reply: &mut Data<R>
) -> Result<()>
pub fn reset(&mut self) -> Result<()>
pub fn delete(&mut self, delete: Delete<'_>) -> Result<()>
sourcepub fn list_credentials<const R: usize>(
&mut self,
reply: &mut Data<R>
) -> Result<()>
pub fn list_credentials<const R: usize>(
&mut self,
reply: &mut Data<R>
) -> Result<()>
The YK5 can store a Grande Totale of 32 OATH credentials.
pub fn register(&mut self, register: Register<'_>) -> Result<()>
pub fn calculate_all<const R: usize>(
&mut self,
calculate_all: CalculateAll<'_>,
reply: &mut Data<R>
) -> Result<()>
pub fn calculate<const R: usize>(
&mut self,
calculate: Calculate<'_>,
reply: &mut Data<R>
) -> Result<()>
pub fn validate<const R: usize>(
&mut self,
validate: Validate<'_>,
reply: &mut Data<R>
) -> Result<()>
pub fn clear_password(&mut self) -> Result<()>
pub fn set_password(&mut self, set_password: SetPassword<'_>) -> Result<()>
Trait Implementations
sourceimpl<T, const C: usize, const R: usize> App<C, R> for Authenticator<T> where
T: Client + HmacSha1 + HmacSha256 + Sha256,
impl<T, const C: usize, const R: usize> App<C, R> for Authenticator<T> where
T: Client + HmacSha1 + HmacSha256 + Sha256,
sourcefn select(&mut self, apdu: &Command<C>, reply: &mut Data<R>) -> Result<()>
fn select(&mut self, apdu: &Command<C>, reply: &mut Data<R>) -> Result<()>
Given parsed APDU for select command.
Write response data back to buf, and return length of payload. Return APDU Error code on error.
Alternatively, the app can defer the response until later by returning it in poll()
. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for Authenticator<T> where
T: RefUnwindSafe,
impl<T> Send for Authenticator<T> where
T: Send,
impl<T> Sync for Authenticator<T> where
T: Sync,
impl<T> Unpin for Authenticator<T> where
T: Unpin,
impl<T> UnwindSafe for Authenticator<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more