Crate ovunto_security

source ·
Expand description

ovunto_security is a library for secure e2ee communication between clients through a server.

It provides functionality for encrypting and decrypting messages, managing keys, construct chain.

§Example

use ovunto_security::{Result, Keyring, Salt};

fn main() -> Result<()> {
    // Generate a random salt
    let salt = Salt::random();

    // Derive a keyring from a password and salt
    let password = "my_password".to_string();
    let keyring = Keyring::derive_from(password, &salt)?;

    // Use the keyring to encrypt and decrypt messages
    let message = "Hello, world!".to_string();
    let encrypted_message = keyring.encrypt_str(message.clone())?;
    let decrypted_message = keyring.decrypt_str(encrypted_message)?;

    assert_eq!(message, decrypted_message);

    Ok(())
}

Re-exports§

Modules§

  • Module for client-side functionality.
  • Constants used in the ovunto_security library.
  • Cryptographic utilities for secure communication and data encryption.
  • Primitives used in the ovunto_security library.