Skip to content

Commit

Permalink
Merge branch 'feat-mock-card'
Browse files Browse the repository at this point in the history
  • Loading branch information
Fethbita committed Oct 14, 2024
2 parents 69b1bf4 + 6406ca5 commit 09f6782
Show file tree
Hide file tree
Showing 2 changed files with 458 additions and 330 deletions.
3 changes: 2 additions & 1 deletion examples/read_emrtd.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::env;

use emrtd::{bytes2hex, get_jpeg_from_ef_dg2, other_mrz, EmrtdComms, EmrtdError};
use rand::rngs::OsRng;
use tracing::{error, info};

#[cfg(feature = "passive_auth")]
Expand Down Expand Up @@ -53,7 +54,7 @@ fn main() -> Result<(), EmrtdError> {
}
};

let mut sm_object = EmrtdComms::new(card);
let mut sm_object = EmrtdComms::<pcsc::Card>::new(card, OsRng);

// Get the card's ATR.
info!("ATR from attribute: {}", bytes2hex(&sm_object.get_atr()?));
Expand Down
Loading

0 comments on commit 09f6782

Please sign in to comment.