Crates.io | encrypted-message |
lib.rs | encrypted-message |
version | 0.3.0 |
source | src |
created_at | 2024-04-11 02:33:46.377744 |
updated_at | 2024-04-28 11:22:34.961707 |
description | Safely encrypt & store serializable data using AES-256-GCM. |
homepage | |
repository | https://github.com/RigoOnRails/encrypted-message |
max_upload_size | |
id | 1204313 |
size | 75,475 |
encrypted-message
Safely encrypt & store serializable data using AES-256-GCM.
[dependencies]
encrypted-message = "0.3"
EncryptedMessage
implements FromSql
& ToSql
, allowing you to use EncryptedMessage
as a field type in your models.
diesel
& diesel-mysql
features. Supports the Json
type.diesel
& diesel-postgres
features. Supports the Json
& Jsonb
types.[dependencies]
encrypted-message = { version = "0.3", features = ["diesel", "diesel-<mysql|postgres>"] }
examples/basic.rs
, a basic example of how to use encrypted-message
.examples/config_with_external_data.rs
, an example of a Config
that depends on external data, like a user-provided key or password.This crate uses trusted, pure-Rust encryption using the aes_gcm
crate
from the Rust Crypto organization.
Keys are handled safely using the secrecy
crate,
which internally uses the zeroize
crate (also from Rust Crypto)
to zero-out the keys in memory when no longer used.