encrypted-message

Crates.ioencrypted-message
lib.rsencrypted-message
version0.3.0
sourcesrc
created_at2024-04-11 02:33:46.377744
updated_at2024-04-28 11:22:34.961707
descriptionSafely encrypt & store serializable data using AES-256-GCM.
homepage
repositoryhttps://github.com/RigoOnRails/encrypted-message
max_upload_size
id1204313
size75,475
Rigo (RigoOnRails)

documentation

README

encrypted-message

crates.io docs.rs "Lint & run tests" workflow License

Safely encrypt & store serializable data using AES-256-GCM.

Install

[dependencies]
encrypted-message = "0.3"

Integration with Diesel

EncryptedMessage implements FromSql & ToSql, allowing you to use EncryptedMessage as a field type in your models.

  • MySQL: Enable the diesel & diesel-mysql features. Supports the Json type.
  • PostgreSQL: Enable the diesel & diesel-postgres features. Supports the Json & Jsonb types.
[dependencies]
encrypted-message = { version = "0.3", features = ["diesel", "diesel-<mysql|postgres>"] }

Examples

Security

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.

Commit count: 115

cargo fmt