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

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let encoded = Transform::encode_base64(b"hello")?;
    let decoded = Transform::decode_base64(encoded.as_bytes())?;
    println!("encoded={encoded} decoded={}", String::from_utf8(decoded)?);
    Ok(())
}