common-crypto
Bindings for Apple's Common Crypto APIs.
Examples
[]
= "0.3"
Cryptor
let config = AES256 ;
let encrypted = encrypt.unwrap;
let decrypted = decrypt.unwrap;
assert_eq!;
Hash
let hash = sha256;
let mut hasher = SHA256 new;
hasher.update;
hasher.update;
let hash = hasher.finish;
HMAC
let auth_code = HMAC sha512;
let mut hasher = SHA256 new;
hasher.update;
hasher.update;
let hash = hasher.finish;
What's missing?
- Resetting cryptors - I don't see a use case for this, so I won't implement it.
- Padding and rounds for cryptors. I want to make sure they're only configurable where they're actually supported.
Contributing
Feel free to contribute in any way you like.