Crates.io | tid-rs |
lib.rs | tid-rs |
version | 0.1.1 |
source | src |
created_at | 2022-08-01 13:11:52.54973 |
updated_at | 2022-08-01 14:57:38.278921 |
description | TouchId integration for Rust |
homepage | |
repository | https://github.com/lightsing/tid-rs |
max_upload_size | |
id | 636765 |
size | 24,257 |
TouchId integration for Rust
async fn touch_id() {
let mut ctx = LAContext::new();
if ctx.can_evaluate_policy(LAPolicy::DeviceOwnerAuthenticationWithBiometrics) {
ctx.set_localized_cancel_title("Use Another Method");
ctx.evaluate_policy(
LAPolicy::DeviceOwnerAuthenticationWithBiometrics,
"Use TouchId to Unlock Rust",
).await;
}
}