1 unstable release
| 0.1.0 | Jul 12, 2022 |
|---|
#1822 in Hardware support
40 downloads per month
8KB
118 lines
Interface to the vsmartcard daemon.
This crate makes it possible to connect to a vpcd daemon and add a virtual smartcard by
implementing the VSmartCard trait.
Examples
Running a dummy smartcard
fn main() -> std::io::Result<()> {
vpicc::connect()?.run(&mut vpicc::DummySmartCard)
}
Running a custom smartcard
struct Card;
impl vpicc::VSmartCard for Card {
fn execute(&mut self, data: &[u8]) -> Vec<u8> {
log::info!("Received APDU: {:x?}", data);
vec![0x90, 0x00] // 9000 == Success
}
}
fn main() -> std::io::Result<()> {
vpicc::connect()?.run(&mut Card)
}
vpicc-rs
vpicc is a Rust interface for vsmartcard. It can be used to connect to the vpcd daemon and add a virtual smartcard.
License
This project is licensed under the MIT license. Configuration files and
examples are licensed under the CC0 1.0 license. For more
information, see the license header in each file. You can find a copy of the
license texts in the LICENSES directory.
This project complies with version 3.0 of the REUSE specification.
Dependencies
~98KB