Struct ecc608_linux::Ecc[][src]

pub struct Ecc { /* fields omitted */ }

Implementations

impl Ecc[src]

pub fn from_path(path: &str, address: u16) -> Result<Self>[src]

pub fn get_info(&mut self) -> Result<Bytes>[src]

pub fn get_serial(&mut self) -> Result<Bytes>[src]

Returns the 9 bytes that represent the serial number of the ECC. Per section 2.2.6 of the Data Sheet the first two, and last byte of the returned binary will always be [0x01, 0x23] and 0xEE

pub fn genkey(&mut self, key_type: KeyType, slot: u8) -> Result<Bytes>[src]

pub fn get_slot_config(&mut self, slot: u8) -> Result<SlotConfig>[src]

pub fn set_slot_config(&mut self, slot: u8, config: &SlotConfig) -> Result[src]

pub fn get_key_config(&mut self, slot: u8) -> Result<KeyConfig>[src]

pub fn set_key_config(&mut self, slot: u8, config: &KeyConfig) -> Result[src]

pub fn get_locked(&mut self, zone: &Zone) -> Result<bool>[src]

pub fn set_locked(&mut self, zone: Zone) -> Result[src]

pub fn sign(&mut self, key_slot: u8, data: &[u8]) -> Result<Bytes>[src]

pub fn random(&mut self) -> Result<Bytes>[src]

pub fn nonce(&mut self, target: DataBuffer, data: &[u8]) -> Result[src]

pub fn read(&mut self, read_32: bool, address: &Address) -> Result<Bytes>[src]

pub fn write(&mut self, address: &Address, bytes: &[u8]) -> Result[src]

Auto Trait Implementations

impl RefUnwindSafe for Ecc

impl Send for Ecc

impl Sync for Ecc

impl Unpin for Ecc

impl UnwindSafe for Ecc

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.