Bindings for Apple's Common Crypto APIs.
toml
[dependencies]
common-crypto = "0.2"
```rust let config = Config::AES256 { mode: Mode::CTR, iv: Some(b"use random iv :)"), key: b"0123456789abcdef0123456789abcdef", };
let encrypted = Cryptor::encrypt(&config, b"Hello").unwrap(); let decrypted = Cryptor::decrypt(&config, encrypted).unwrap(); assert_eq!(decrypted, b"Hello"); ```
rust
let hash = Hash::sha256(b"data");
rust
let mut hasher = SHA256::new();
hasher.update(b"data");
hasher.update(b"more data");
let hash = hasher.finish();
rust
let auth_code = HMac::sha512(b"Key", b"Input");
Feel free to contribute in any way you like.