ovunto-security 0.1.16

A library for secure end-to-end communication between clients through a server.
Documentation
//! `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(())
//! }
//! ```

extern crate aes_gcm;
extern crate argon2;
extern crate base32;
extern crate base64;
extern crate blake3;
extern crate chrono;
extern crate hex;
extern crate hmac;
#[macro_use]
extern crate ovunto_security_macros;
extern crate rand;
extern crate rand_core;
extern crate rsa;
extern crate secp256k1;
extern crate serde;
extern crate serde_json;
extern crate sha1;
extern crate sha2;

pub use client::{
    Chain, ChainLayer, ClientVault, Credentials, CredentialsChange, Keyring, VaultChange,
};
pub use crypto::{CipherMessage, Hmac, Key, Nonce, Salt};
pub use primitives::{Algorithm, Error, Result};
pub use totp::{TOTPGenerator, TOTP};
pub use traits::{Decrypt, Encrypt, FromBytes, IntoBytes};

pub mod client;
pub mod constants;
pub mod crypto;
pub mod primitives;
pub mod totp;
pub mod traits;