pub struct Ecc { /* private fields */ }Implementations§
Source§impl Ecc
impl Ecc
pub fn from_path( path: &str, address: u16, config: Option<EccConfig>, ) -> Result<Self>
pub fn get_info(&mut self) -> Result<Bytes>
Sourcepub fn get_serial(&mut self) -> Result<Bytes>
pub fn get_serial(&mut self) -> Result<Bytes>
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>
pub fn get_slot_config(&mut self, slot: u8) -> Result<SlotConfig>
pub fn set_slot_config(&mut self, slot: u8, config: &SlotConfig) -> Result
pub fn get_key_config(&mut self, slot: u8) -> Result<KeyConfig>
pub fn set_key_config(&mut self, slot: u8, config: &KeyConfig) -> Result
pub fn get_locked(&mut self, zone: &Zone) -> Result<bool>
pub fn set_locked(&mut self, zone: Zone) -> Result
pub fn sign(&mut self, key_slot: u8, data: &[u8]) -> Result<Bytes>
pub fn ecdh(&mut self, key_slot: u8, x: &[u8], y: &[u8]) -> Result<Bytes>
pub fn random(&mut self) -> Result<Bytes>
pub fn nonce(&mut self, target: DataBuffer, data: &[u8]) -> Result
pub fn read(&mut self, read_32: bool, address: Address) -> Result<Bytes>
pub fn write(&mut self, address: Address, bytes: &[u8]) -> Result
Auto Trait Implementations§
impl Freeze for Ecc
impl !RefUnwindSafe for Ecc
impl Send for Ecc
impl !Sync for Ecc
impl Unpin for Ecc
impl !UnwindSafe for Ecc
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more