mirror of
https://gitlab.com/fabinfra/fabaccess/nfc_rs.git
synced 2025-03-14 07:41:45 +01:00
28 lines
656 B
Rust
28 lines
656 B
Rust
use crate::iso7816_4::apduresponse::APDUResponse;
|
|
use crate::iso7816_4::apducommand::APDUCommand;
|
|
use error::Result;
|
|
|
|
pub mod crypto;
|
|
pub mod iso7816_4;
|
|
pub mod desfire;
|
|
pub mod error;
|
|
|
|
pub trait Card {
|
|
/// <summary>
|
|
/// Connect to Smartcard
|
|
/// </summary>
|
|
fn connect(&self);
|
|
|
|
/// <summary>
|
|
/// Disconnect from Smartcard
|
|
/// </summary>
|
|
fn disconnect(&self);
|
|
|
|
/// <summary>
|
|
/// Transmit APDU Command to Smartcard
|
|
/// </summary>
|
|
/// <param name="apdu_cmd">Application Protocol Data Unit Command - ISO 7816</param>
|
|
/// <returns>Application Protocol Data Unit Response - ISO 7816</returns>
|
|
fn transmit(&self, apdu_cmd: APDUCommand) -> Result<APDUResponse>;
|
|
}
|