| Crates.io | finneo_crypto |
| lib.rs | finneo_crypto |
| version | 0.1.0 |
| created_at | 2025-12-01 14:02:54.843498+00 |
| updated_at | 2025-12-01 14:02:54.843498+00 |
| description | Cross-platform AES-256-GCM encryption with Argon2id key derivation used in Finneo |
| homepage | |
| repository | https://github.com/Finneo-Oy/finneo-crypto |
| max_upload_size | |
| id | 1959800 |
| size | 36,454 |
Cross-platform encryption library using AES-256-GCM and Argon2id key derivation.
[dependencies]
finneo_crypto = "0.1"
use finneo_crypto::{encrypt, decrypt, derive_key, generate_salt};
// Generate a key from password
let salt = generate_salt().unwrap();
let key = derive_key("my-password".to_string(), salt).unwrap();
// Encrypt
let plaintext = b"Hello, World!".to_vec();
let ciphertext = encrypt(plaintext, key.clone()).unwrap();
// Decrypt
let decrypted = decrypt(ciphertext, key).unwrap();
assert_eq!(decrypted, b"Hello, World!");
Generate Kotlin bindings:
cargo build --release
cargo run --bin uniffi-bindgen generate \
--library target/release/libfinneo_crypto.dylib \
--language kotlin \
--out-dir bindings/kotlin
import uniffi.finneo_crypto.*
val salt = generateSalt()
val key = deriveKey("my-password", salt)
val ciphertext = encrypt("Hello".toByteArray(), key)
val plaintext = decrypt(ciphertext, key)
ring for cryptographic primitivesMIT License - see LICENSE for details.