Skip to main content

BasicGen1

Struct BasicGen1 

Source
pub struct BasicGen1 { /* private fields */ }

Implementations§

Source§

impl BasicGen1

Source

pub fn new(connection: Connection, serial: u64, applet_version: Vec<u8>) -> Self

Source

pub fn with_data(self, data: Vec<u8>) -> Self

Trait Implementations§

Source§

impl Base for BasicGen1

Source§

fn select_adpu() -> Vec<u32>

Source§

fn card_type() -> u32

Source§

fn pin_rule() -> String

Source§

fn puk_rule(&self) -> String

Source§

fn change_pairing_key( &mut self, index: u8, pairing_key: &[u8], puk: String, ) -> Result<(), Error>

Source§

fn change_pin(&mut self, new_pin: String) -> Result<(), Error>

Source§

fn change_puk( &mut self, current_puk: String, new_puk: String, ) -> Result<(), Error>

Source§

fn init( &self, name: String, email: String, pin: String, puk: String, pairing_secret: Option<Bytes>, _nfc_sign: Option<bool>, ) -> Result<Vec<u8>, Error>

Source§

fn derive( &mut self, _key_type: Option<u8>, path: Option<PathBuf>, ) -> Result<(), Error>

Source§

fn dual_seed_public_key(&mut self, pin: &str) -> Result<Bytes, Error>

Source§

fn dual_seed_load(&mut self, data: Bytes, pin: &str) -> Result<(), Error>

Source§

fn extended_public_key(&self) -> bool

Source§

fn generate_random_number(&mut self, size: u8) -> Result<Bytes, Error>

Source§

fn generate_seed(&mut self, pin: &str) -> Result<Bytes, Error>

Source§

fn get_public_key( &mut self, derivation: u8, key_type: Option<u8>, path: Option<PathBuf>, compressed: Option<bool>, ) -> Result<Bytes, Error>

Source§

fn history(&mut self, index: u8) -> Result<(u32, Bytes), Error>

Source§

fn is_initialized(&self) -> bool

Source§

fn load_seed( &mut self, seed: Option<Bytes>, pin: Option<String>, ) -> Result<(), Error>

Source§

fn pin_authentication(&self) -> bool

Source§

fn pinless_enabled(&self) -> bool

Source§

fn reset(&mut self, puk: &str)

Source§

fn seed_source(&mut self) -> Result<SeedSource, Error>

Source§

fn set_pin_authentication( &mut self, status: bool, puk: &str, ) -> Result<(), Error>

Source§

fn set_pinless_path(&mut self, path: String, puk: &str) -> Result<(), Error>

Source§

fn set_extended_public_key( &mut self, status: bool, puk: &str, ) -> Result<(), Error>

Source§

fn sign( &mut self, data: Bytes, derivation: Option<u8>, key_type: Option<u8>, path: Option<&str>, pin: Option<&str>, filter_eos: Option<bool>, ) -> Result<Bytes, Error>

Source§

fn signing_counter(&mut self) -> Result<u32, Error>

Source§

fn unblock_pin(&mut self, puk: String, new_pin: String) -> Result<(), Error>

Source§

fn user_data(&self) -> Bytes

Source§

fn write_user_data(&self, _value: Bytes)

Source§

fn user_key_add( &mut self, slot_index: u8, data_info: &str, public_key: Bytes, puk: &str, cred_id: Option<Bytes>, ) -> Result<(), Error>

Source§

fn user_key_delete(&mut self, slot: u8, puk: &str) -> Result<(), Error>

Source§

fn user_key_info(&mut self, slot: u8) -> Result<(String, Bytes), Error>

Source§

fn user_key_enabled(&self, slot: u8) -> bool

Source§

fn user_key_challenge_response_nonce(&mut self) -> Result<Bytes, Error>

Source§

fn user_key_challenge_response_open( &mut self, slot: u8, signature: Bytes, ) -> bool

Source§

fn user_key_signature_open( &mut self, slot: u8, message: Bytes, signature: Bytes, ) -> bool

Source§

fn valid_key(&self) -> bool

Source§

fn valid_pin( &self, pin: String, _pin_name: Option<String>, ) -> Result<String, Error>

Source§

fn valid_puk( &self, puk: String, _puk_name: Option<String>, ) -> Result<String, Error>

Source§

fn verify_pin(&mut self, pin: &str)

Source§

fn sign_eos( &mut self, _apdu: &[u32], _data: Bytes, _pin: &str, ) -> Result<Bytes, Error>

Source§

fn get_info(&mut self) -> Result<Bytes, Error>

Source§

fn signature_check( &mut self, _nonce: Bytes, ) -> Result<SignatureCheckResponse, Error>

Source§

fn is_alive(&mut self) -> bool

Returns whether the connection to the card is established and the card hasn’t been changed
Source§

fn info(&mut self) -> CardInfo

Source§

fn is_open(&self) -> bool

Source§

fn origin(&mut self) -> CardOrigin

Source§

impl BasePriv for BasicGen1

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more