common-crypto

github action crates.io docs.rs

Bindings for Apple's Common Crypto APIs.

Example

toml [dependencies] common-crypto = "0.1"

```rust use common_crypto::{AES256, CryptorBuilder, Mode};

let encryptor = CryptorBuilder::::new(Mode::CTR, b"0123456789abcdef") .iv(b"use random iv :)") .encryptor() .unwrap();

let mut encrypted = Vec::new(); encryptor.update(b"Hello", &mut encrypted).unwrap();

let decryptor = CryptorBuilder::::new(Mode::CTR, b"0123456789abcdef") .iv(b"use random iv :)") .decryptor() .unwrap();

let mut decrypted = Vec::new(); decryptor.update(&encrypted, &mut decrypted).unwrap();

assert_eq!(decrypted, b"Hello"); ```

What's missing?

Contributing

Feel free to contribute in any way you like.