Struct rust_cryptoauthlib::AteccDevice[][src]

pub struct AteccDevice { /* fields omitted */ }

An ATECC cryptochip context holder.

Implementations

impl AteccDevice[src]

Implementation of CryptoAuth Library API Rust wrapper calls

pub fn new(r_iface_cfg: AtcaIfaceCfg) -> Result<AteccDevice, String>[src]

ATECC device instance constructor

pub fn sha(&self, message: Vec<u8>, digest: &mut Vec<u8>) -> AtcaStatus[src]

Request ATECC to compute a message hash (SHA256)

pub fn random(&self, rand_out: &mut Vec<u8>) -> AtcaStatus[src]

Request ATECC to generate a vector of random bytes

pub fn gen_key(&self, key_type: KeyType, slot_number: u8) -> AtcaStatus[src]

Request ATECC to generate a cryptographic key

pub fn get_device(&self) -> AtcaDevice[src]

pub fn get_device_type(&self) -> AtcaDeviceType[src]

Request ATECC to return own device type

pub fn configuration_is_locked(&self, is_locked: &mut bool) -> AtcaStatus[src]

Request ATECC to check if its configuration is locked. If true, a chip can be used for cryptographic operations

pub fn read_config_zone(&self, config_data: &mut Vec<u8>) -> AtcaStatus[src]

Request ATECC to read and return own configuration zone. Note: this function returns raw data, function get_config(..) implements a more structured return value.

pub fn cmp_config_zone(
    &self,
    config_data: &mut Vec<u8>,
    same_config: &mut bool
) -> AtcaStatus
[src]

Compare internal config zone contents vs. config_data. Diagnostic function.

pub fn release(&self) -> AtcaStatus[src]

ATECC device instance destructor

pub fn get_config(&self, atca_slots: &mut Vec<AtcaSlot>) -> AtcaStatus[src]

Request ATECC to read the configuration zone data and return it in a structure

Trait Implementations

impl Debug for AteccDevice[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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.

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.