security-rs 0.2.0

Safe Rust bindings for Apple's Security framework — keychain, identity, certificates, trust, authorization, CMS, SecureTransport, and cryptographic primitives on macOS
Documentation
1
2
3
4
5
6
7
8
9
use security::Authorization;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let authorization = Authorization::new()?;
    let external = authorization.external_form()?;
    let _round_trip = Authorization::from_external_form(&external)?;
    println!("external_form_len={}", external.len());
    Ok(())
}