| Crates.io | fido2-rs |
| lib.rs | fido2-rs |
| version | 0.4.0 |
| created_at | 2023-01-07 17:58:31.845768+00 |
| updated_at | 2025-11-22 15:14:50.658253+00 |
| description | Rust bindings to Yubico fido2 |
| homepage | |
| repository | https://github.com/tyan-boot/fido-rs |
| max_upload_size | |
| id | 753165 |
| size | 84,633 |
libfido2 bindings for the Rust programming language.
For more details, see tyan-boot/fido-rs
use fido2_rs::device::Device;
use fido2_rs::credentials::Credential;
use fido2_rs::credentials::CoseType;
use anyhow::Result;
fn main() -> Result<()> {
let dev = Device::open("windows://hello").expect("unable open windows hello");
let mut cred = Credential::new();
cred.set_client_data(&[1, 2, 3, 4, 5, 6])?;
cred.set_rp("fido_rs", "fido example")?;
cred.set_user(&[1, 2, 3, 4, 5, 6], "alice", Some("alice"), None)?;
cred.set_cose_type(CoseType::RS256)?;
let _ = dev.make_credential(&mut cred, None)?;
dbg!(cred.id());
Ok(())
}