security-rs 0.2.1

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
10
use security::Authorization;

#[test]
fn externalizes_and_rehydrates() -> security::Result<()> {
    let authorization = Authorization::new()?;
    let external = authorization.external_form()?;
    assert!(!external.is_empty());
    let _round_trip = Authorization::from_external_form(&external)?;
    Ok(())
}